Add instructions to run in Extension Development Host

This commit is contained in:
Dag Evensberget 2020-02-06 10:42:34 +10:00
parent f380fdc207
commit b439d7f865

View File

@ -1,10 +1,10 @@
# Installation # Manual 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`. >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`.
_Alternatively_, the extension can be built and installed manually as in the next section. This should only be required for developers. _Alternatively_, the extension can be built and installed manually as in the next section. This should only be required for developers.
## Manual installation from source code ## Build the extension
1. Clone the repository and enter into the folder 1. Clone the repository and enter into the folder
@ -19,14 +19,32 @@ _Alternatively_, the extension can be built and installed manually as in the nex
npm install npm install
``` ```
3. Create a package using `vsce` 3. Compile with `npm`
```bash
npm run compile
```
At this point the extension may be debugged in the Extension Development Host:
```bash
code .
```
followed by the `Debug/Start Debugging` dropdown (or the `F5` key). To observe the extension in action, view the file `demo.in`.
To complete the manual installation, follow the remaining steps to manually create and install the package:
## Package and install the extension
4. Create a package using `vsce`
```bash ```bash
vsce package vsce package
``` ```
This should generate a `swmf-grammar-?.?.?.vsix` file in the current directory. This should generate a `swmf-grammar-?.?.?.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) 5. Manually install the extension in VS Code (you may want to replace the wildcards in the version number)
```bash ```bash
code --install-extension swmf-grammar-?.?.?.vsix code --install-extension swmf-grammar-?.?.?.vsix