Thank you for taking the time to read how to contribute to Marp for VS Code! This is the guideline for contributing to Marp for VS Code.
We are following the contributing guideline of Marp team projects. You have to read this before starting work.
git clone https://github.com/marp-team/marp-vscode.git
cd ./marp-vscode
npm install
Typically using VS Code's debugger is good. See launch configurations on .vscode/launch.json
.
- Build and run: Compile TypeScript and run compiled extension.
- Run: Only run compiled extension. It's useful running together with
npm run watch
. Recommend to executeRestart Debugging
manually when updated source code. - Run with extensions: Run compiled extension with enabled other installed extensions. It's useful to validate the race condition.
Launch configurations have 2 extra environment variants [Web]
and [Pseudo web]
to develop web extensions.
- No variant: Test extension on the new VS Code host. For normal extension development.
[Web]
: Test web extension on the new browser that opens VS Code web.[Pseudo web]
: Test web extension on the new VS Code host that simulates Web environment. In this mode, please note that a contribution to Markdown preview will not work correctly. (microsoft/vscode#133399)
Marp team adopts Jest as test runner. This repository can run unit test by npm run test:unit
.
npm run test:unit
NOTE: It seems to be difficult to run VSCode's E2E test on Jest. We're welcome to contribute for supporting E2E tests.
npm run package
A way to release is different from other projects of Marp Team targeted to npm.
Just run npm run vsce:publish [major|minor|patch]
at the latest main
branch. It can bump version and release to Marketplace at once. Don't forget git push && git push --tags
!