Assumption: motoko, node-motoko and this repository are in the same directory, e.g.
~/node-motoko
~/motoko
~/vscode-motoko
Start debugging the extension using the Run Extension with Local Motoko configuration.
Choose this configuration and hit F5.
It should apply all the steps below automatically. Here is an overview of the steps:
- Building the
motokorepo with the needed executables - Updating the executables in
node-motokorepo - Using the changed
node-motokoas a dependency invscode-motoko - Running the extension with the local Motoko compiler
Prepare your local changes, make sure they compile.
Build the project and execute the generate script to copy the compiled moc.js and moc_interpreter.js:
npm install
npm run build
npm run generate local- Change the
motokodependency inpackage.jsonto point to the local repo:
npm install ../node-motoko It should look like this:
"motoko": "file:../node-motoko",
- Make sure the
.vscodeignorefile is present and contains../**/*to ignore bundlingnode_modulesfrom thenode-motokodirectory.
Run npm run package to package the extension and install it:
code --install-extension vscode-motoko-*.*.*.vsix