NPM Script Explorer is convenient for running npm script in a mouse click without navigating to the specific folder and typing the command.
Is there any way can binding specific script such as build
with keyboard (ctrl+R
or setup the hotkey) ?
NPM Script Explorer is convenient for running npm script in a mouse click without navigating to the specific folder and typing the command.
Is there any way can binding specific script such as build
with keyboard (ctrl+R
or setup the hotkey) ?
If you search in the keyboard shortcuts for "npm-script" you will see one command for running the npm script test
already bound to Ctrl-R T.
There is a command for a "build" script, but it isn't bound to anything yet:
npm-script.build
You could select that one in the keyboard shortcuts page and set a keybinding to it.
Also see my answer at shortcut for an npm script. For example:
{
"key": "ctrl+alt+u",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "npm run-script someScriptNameHere\u000D"
}
}
Just replace someScriptName
with whatever script you want to run, and choose your own keybinding.