Build the extension using Node and then install it in your IDE, using the latest code in the repo. This is ideal for testing out local changes you've made in the extension, without creating a tag yet.
Navigate to the repo root and then run this:
$ make extThat will do the following:
- Run lint checks.
- Build the extension using the current codebase and output as an
.vsixarchive file to thebuilddirectory. Performs all necessary code quality checks. - Install the extension globally in VS Code.
You should then restart VS Code.
You can find the extension in the Extension tab.
If using WSL, then after the build is complete you might get an error:
ERROR: UtilConnectToInteropServer
In that case, you'll need to install from the .vsix file yourself:
- Open the VS Code Command Palette under View.
- Select the option Extension: Install from VSIX....
- Enter the path to the file e.g.
/home/my-user/repos/auto-commit-msg/build/auto-commit-msg-0.25.1.vsix.
About the ext command in package.json:
- We use the
--forceflag to allow downgrade to an older version, according to the CLI output help. - The command sorts by time to find the latest version. Since sorting by name is not reliable, such as when the version is
0.9.0and0.10.0and the latter is meant to be higher but appears like a lower version)