VSCode npm运行插件

This extension supports running npm scripts defined in the package.json file and validating the installed modules against the dependencies defined in the package.json.

Notice The validation is done by running npm and it is not run when the modules are managed by yarn.

The package.json validation reports warnings for modules:

  • that are defined in the package.json, but that are not installed
  • that are installed but not defined in the package.json
  • that are installed but do not satisfy the version defined in the package.json.

Quick fixes to run npm are provided for reported warnings.

package.json validation

Commands for running scripts are available the npm category.

command palette

  • Run npm install, also available in the context menu of the explorer when the `package.json file
  • 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.
  • Terminate a running script

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

npm

猜你喜欢

转载自my.oschina.net/u/3797187/blog/1817494