Developing VS Code extensions requires Node.js. The development workflows have been tested with Node.js 1.63.
Install Node.js from any of the following:
PATH
.PATH
.Read about extensions, concepts and guides:
To build and run the extension:
Open this directory (vscode-plugins
) in VS Code.
Open the terminal window and run npm install
.
On the left side Run/Debug pane, click Run.
This opens another VS Code instance with the extension installed.
To test the extension:
npm test
.Open this directory (vscode-plugins
) in VS Code:
cd ~/vscode-plugins
Remove any files that are not tracked by git and are not listed in .vscodeignore
:
Note: This ensures a clean build.
git clean -xdf
Do a clean npm install:
Note: npm ci
is like npm install
, except that it re-downloads a clean copy of the node_modules
directory using package-lock.json
and errors out if package-lock.json
is out of sync with package.json
.
npm ci
Test the npm install:
npm test
Package the extension:
npx vsce package --baseContentUrl https://fuchsia.googlesource.com/vscode-plugins/+/refs/heads/main/