From 86c5b5580098fcb207ec1105f937288cd6ad8148 Mon Sep 17 00:00:00 2001 From: Dag Evensberget Date: Mon, 2 Dec 2019 12:24:52 +1000 Subject: [PATCH] Tidy README and package configuration --- CHANGELOG.md | 4 +++- README.md | 45 +++++++++++++++++++++++++++++++++++++++------ package.json | 13 +++++++------ 3 files changed, 49 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b4f6f7..1674650 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,4 +10,6 @@ Initial release with syntax highlighting. ### 0.2.0 Added hierarchical outline view. ### 0.2.2 -Fixed image in README to reflect new features. \ No newline at end of file +Fixed image in README to reflect new features. +### 0.2.3 +Tidy README and clean up `devDependencies`. diff --git a/README.md b/README.md index 41b45f9..d4d9085 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,50 @@ -# SWMF configuration file syntax highlighting +# SWMF configuration file syntax -Syntax highlighting and some code completion for [Space Weather Modelling Framework (SWMF)](http://csem.engin.umich.edu/tools/swmf/) configuration files, such as the BATSRUS `PARAM.in` file. The rules are based on the [SWMF manual](http://csem.engin.umich.edu/tools/swmf/documentation/SWMF.pdf) section 3.2.2. +> This is a Visual Studio Code extension and should be installed from the [VS Code extensions marketplace](https://marketplace.visualstudio.com/items?itemName=svaberg.swmf-grammar) + +This extension provides syntax highlighting, outline view, and some code completion for [Space Weather Modelling Framework (SWMF)](http://csem.engin.umich.edu/tools/swmf/) configuration files, such as the BATSRUS `PARAM.in` file. The rules are based on the [SWMF manual](http://csem.engin.umich.edu/tools/swmf/documentation/SWMF.pdf) section 3.2.2. Automatically highlights files ending in `.in` and `.IN`. -A document tree is also provided in the outline view. - -![highlight and folding demo](images/demo.png) +![Features demo](images/demo.png) ## Features * Syntax highlighting - * Comment/uncomment using `!` as comment character. * Hierarchical document tree in outline view. + * Toggle comment using `!` as comment character. * Code folding between `#BEGIN_COMP` and `#END_COMP` markers. * Autoclosing of `#BEGIN_COMP`. + +## Installation + +This is a [Visual Studio Code](https://code.visualstudio.com/download) extension. It is best installed from the [on-line extensions marketplace](https://marketplace.visualstudio.com/items?itemName=svaberg.swmf-grammar), or from inside VS Code `Preferences/Extensions` and search for `swmf-grammar`. + +### Alternative installation from source code + +This should only be required for developers. + +1. Clone the repository and enter into the folder + ```bash + git clone git@github.com:svaberg/SWMF-grammar.git + cd SWMF-grammar + ``` +2. Install the required packages + ```bash + npm install + ``` +3. Create a package + ```bash + vsce package + ``` + This should generate a `.vsix` file in the current directory. +4. Manually install the extension in VS Code (you may want to replace the wildcards in the version number) + ```bash + code --install-extension swmf-grammar-?.?.?.vsix + ``` + +To test the installation, open the current folder in VS Code +```bash +code . +``` +and view the file `demo.in`. \ No newline at end of file diff --git a/package.json b/package.json index cbb2b77..107f595 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,20 @@ { "name": "swmf-grammar", - "displayName": "swmf-grammar", - "description": "SWMF Configuration grammar for VS Code", + "displayName": "SWMF Configuration language support", + "description": "Syntax highlights and outline view for SWMF configuration files", "version": "0.2.2", "publisher": "svaberg", "repository": { "type": "git", "url": "https://github.com/svaberg/SWMF-grammar" }, + "license": "MIT License", "engines": { "vscode": "^1.40.0" }, "categories": [ - "Programming Languages" + "Programming Languages", + "Formatters" ], "main": "./out/extension.js", "activationEvents": [ @@ -44,11 +46,10 @@ "scripts": { "vscode:prepublish": "npm run compile", "compile": "tsc -p ./", - "watch": "tsc -watch -p ./", - "pretest": "npm run compile", - "test": "node ./out/test/runTest.js" + "watch": "tsc -watch -p ./" }, "devDependencies": { + "typescript": "^3.7.2", "vscode": "^1.1.36" } }