Prerequisites:
- Install node
- Install yarn:
npm install -g yarn
After you clone the repo, install the dependencies with yarn:
yarn install
To run and debug the extension locally, open the extension in vscode and press F5.
To debug the webviews in the extension host, run ctrl+shift+i to open the dev tools.
To run the extension in the browser, run:
yarn run-in-browser
To create a vsix file, first install vsce:
npm install -g @vscode/vsce
Then use vsce to package the vsix
vsce package
If you want to develop using your local clone of pxt-mkc, you need to link the makecode-core
and makecode-browser
packages.
cd pxt-mkc/packages/makecode-core
yarn link
cd ../makecode-browser
yarn link
cd ../../vscode-makecode
yarn link makecode-core makecode-browser
Make sure you run yarn compile
inside of makecode-core
and makecode-browser
to build the packages!
The extension is published through an Azure DevOps Pipeline: vscode-makecode release publishing pipeline
Click "Run Pipeline" in the upper right, then check (or uncheck) the isPrerelease
box in the flyout that appears as needed. The other fields should be okay with their default values.
You will likely need to update the PAT used to auth to the vscode marketplace. To do this:
- Go to your Azure DevOps User Settings -> Personal Access Tokens (here).
- Create a new PAT. Set the scope to "Custom Defined" and then scroll down to "Marketplace" and give "Read", "Publish", and "Manage" permissions to the PAT.
- With the new PAT, go to the "makecode-marketplace-pat" variable group under Pipelines -> Library. (here)
- Find the
marketplace-pat
variable, update it with your new PAT, and click "Save" at the top of the page. - Now run the pipeline