VSCode extension for running npm-scripts and validating the package.json files.
Перейти к файлу
Ladislau Szomoru 11ad6e3f34
Engineering - fix YAML indentation (#185)
2024-03-18 14:50:48 +01:00
.vscode remove render whitespace settings overwrite 2020-03-03 11:27:49 +01:00
assets Fix package.json's format and add .DS_Store to .gitignore 2019-05-06 10:45:02 -03:00
build Engineering - fix YAML indentation (#185) 2024-03-18 14:50:48 +01:00
images Update change log and readme 2022-06-29 13:41:22 +02:00
src Fixing #76 npm build is broken 2022-06-28 21:49:00 +02:00
test migrate from tslint to eslint 2020-02-03 15:42:53 +01:00
typings Add more restrictive type checks and some tslint rules 2017-01-01 23:33:17 +01:00
.DS_Store Remove .DS_Store from assets folder 2019-05-06 10:45:34 -03:00
.eslintrc.js migrate from tslint to eslint 2020-02-03 15:42:53 +01:00
.gitignore Remove .DS_Store from assets folder 2019-05-06 10:45:34 -03:00
.vscodeignore Add more items to the ignore list 2022-01-13 21:16:14 +01:00
CHANGELOG.md Fix dependabot warnings 2022-09-27 11:42:09 +02:00
LICENSE preparting to package 2015-11-17 09:44:57 -05:00
README.md Deprecate the extension 2022-06-29 16:03:26 +02:00
SECURITY.md Create SECURITY.md 2021-03-11 20:46:36 +01:00
issues.github-issues . 2020-04-02 21:11:07 +02:00
npm_icon.png adding an icon 2016-01-16 23:00:03 +01:00
package-lock.json Fix dependabot warnings 2022-09-27 11:42:09 +02:00
package.json Fix dependabot warnings 2022-09-27 11:42:09 +02:00
tsconfig.json Fix #44 Exception when the workspace contains a root folder with another scheme than 'file' 2017-10-20 15:44:44 +02:00
webpack.config.js webpacking 2019-01-24 10:12:00 +01:00

README.md

Node npm

vscode version number of installs average user rating license

IMPORTANT: This extension has been deprecated. Support for running npm scripts is now provided by VS Code. You can run npm scripts as tasks using task auto detection or from the npm scripts explorer.

This extension supports running npm scripts defined in the package.json file.

Commands

Commands for running scripts are available the npm category.

  • Run a script (npm run-script) defined in the package.json by picking a script defined in the scripts section of the package.json.
  • Rerun the last npm script you have executed using this extension.
  • Run npm install, also available in the context menu of the explorer when the package.json file
  • Terminate a running script

The scripts can be run either in the integrated terminal or an output window.

Touch bar

Support for Macbook Pro touch bar. You can run the following commands:

  • npm install
  • npm start
  • npm test
  • npm build

touch bar support

Settings

  • npm.runInTerminal defines whether the command is run in a terminal window or whether the output form the command is shown in the Output window. The default is to show the output in the terminal.
  • npm.includeDirectories define additional directories that include a package.json.
  • npm.useRootDirectory define whether the root directory of the workspace should be ignored, the default is false.
  • npm.runSilent run npm commands with the --silent option, the default is false.
  • npm.bin custom npm bin name, the default is npm.
  • npm.enableTouchbar Enable the npm scripts on macOS touchbar.
  • npm.oldKeybindings.enable Enable the original npm keybindings that start with cmd/ctrl R

Example

{
  "npm.runInTerminal": false,
  "npm.includeDirectories": [
    "subdir1/path",
    "subdir2/path"
  ]
}

Keyboard Shortcuts

This extension originally defined a chording keyboard shortcut for the R key. This has resulted in conflicts with the keybindings provided by VS Code and has caused frustration. To avoid these conflicts the keybindings have been changed to use the existing chording shortcut starting with the K key. The following table shows the default key bindings that can always be changed, see the customization documentation.

Command Old New
Rerun last script CMD+R R CMD+K L
Select a script to run CMD+R SHIFT+R CMD+K SHIFT+R
Terminate the running script CMD+R SHIFT+X CMD+K SHIFT+X
Run the test script CMD+R T CMD+K T

If you prefer the old keybindings starting with R you can define the setting npm.oldKeybindings.enable to true.