If you have never worked on a VSCode extension before, it is worth reading through VSCode's docs first
Fork the project in Github, then:
git clone [email protected]:<your-username>/vscode-margin-colours.git
yarn
Open the project in VSCode and hit F5
This will compile and run the extension in a new Extension Development Host window
You can open any project here and test the extension behaves as expected
When you make changes to the code you have to restart the Extension Development Host to see them
If you get stuck on anything, check out the VSCode Extension Docs
All tests can be found in ./src/test/extension.spec.ts
Any new feature/bug fix will require a test to be added
Tests are written using Mocha, Sinon and Chai
Tests can be run with either:
yarn test
yarn test:watch
Create a pull request through Github and it will be reviewed, and then merged if all is good
A Circle CI build will trigger automatically, which will lint & test the code and ensure it packages without errors
You don't really need to worry about packaging/publishing as this will be handled for you when your pull request is merged in
But if you want to test packaging locally, you can run
yarn vsce package
which will package the extension and generate a .vsix file
You can inspect the packaged contents by changing the .vsix extension to .zip
You can install the generated package by running
code --install-extension vscode-margin-colours-<version>.vsix
You will need to have added code to your path and you'll need to restart VSCode to see the new installation in action
Publish won't work at all without the correct permissions