- The NR1 CLI must be installed.
- Clone this repo.
- Open
nr1.code-workspace
in VSCode. - Press F5 to launch the extension host.
Note:
After launching the extension host, you need to have a "blank slate" to create a new nerdpack.
Commands provided by the extension can be run use the VSCode command pallette (SHIFT + CMD + P)
.
- In the
extension.ts
file, there is an activate function. This is the "hook" that gets called to connect the commands. - In the
context.subscriptions.push
, add a newvscode.commands.registerCommand()
function. - The first argument in the function is an "id" for the command which is the extension's id & the id for the command:
<extension-id>.<command-id>
. ex:nr1.undeployNerdpack
- The second argument is the callback function for that command.
- In the package.json, add the command in the
activationEvents
array. - And add under the
contributes
key, in thecommands
array as an object with the command id and name.
ex:
{
command: "nr1.undeployNerdpack",
title: "Nerdpack: undeploy"
}