vscode/extensions/npm
2021-11-12 17:14:51 +01:00
..
.vscode
images tweak sizing 2020-05-27 10:52:23 -07:00
src Add setting to exclude scripts from NPM scripts view 2021-11-12 17:14:51 +01:00
.vscodeignore Do not ship unnecessary files with extensions 2020-07-24 13:57:51 +02:00
extension-browser.webpack.config.js adopt web extensions to webpack 5 2021-07-08 21:41:03 +02:00
extension.webpack.config.js polish webpack configs 2021-07-09 11:55:21 +02:00
package.json Add setting to exclude scripts from NPM scripts view 2021-11-12 17:14:51 +01:00
package.nls.json Add setting to exclude scripts from NPM scripts view 2021-11-12 17:14:51 +01:00
README.md feat: Autodetect npm.packageManager #102050 (#102494) 2020-11-02 14:48:11 +01:00
tsconfig.json use enabledApiProposals instead of wildcard property, also update compilation units to only include d.ts-files that are needed, https://github.com/microsoft/vscode/issues/131165 2021-11-12 11:05:57 +01:00
yarn.lock [html/css/json] update services 2021-07-25 17:31:20 +02:00

Node npm

Notice: This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.

Features

Task Running

This extension supports running npm scripts defined in the package.json as tasks. Scripts with the name 'build', 'compile', or 'watch' are treated as build tasks.

To run scripts as tasks, use the Tasks menu.

For more information about auto detection of Tasks, see the documentation.

Script Explorer

The Npm Script Explorer shows the npm scripts found in your workspace. The explorer view is enabled by the setting npm.enableScriptExplorer. A script can be opened, run, or debug from the explorer.

Run Scripts from the Editor

The extension supports to run the selected script as a task when editing the package.jsonfile. You can either run a script from the hover shown on a script or using the command Run Selected Npm Script.

Run Scripts from a Folder in the Explorer

The extension supports running a script as a task from a folder in the Explorer. The command Run NPM Script in Folder... shown in the Explorer context menu finds all scripts in package.json files that are contained in this folder. You can then select the script to be executed as a task from the resulting list. You enable this support with the npm.runScriptFromFolder which is false by default.

Others

The extension fetches data from https://registry.npmjs.org and https://registry.bower.io to provide auto-completion and information on hover features on npm dependencies.

Settings

  • npm.autoDetect - Enable detecting scripts as tasks, the default is on.
  • npm.runSilent - Run npm script with the --silent option, the default is false.
  • npm.packageManager - The package manager used to run the scripts: auto, npm, yarn or pnpm, the default is auto, which detects your package manager based on your files.
  • npm.exclude - Glob patterns for folders that should be excluded from automatic script detection. The pattern is matched against the absolute path of the package.json. For example, to exclude all test folders use '**/test/**'.
  • npm.enableScriptExplorer - Enable an explorer view for npm scripts.
  • npm.scriptExplorerAction - The default click action: open or run, the default is open.
  • npm.enableRunFromFolder - Enable running npm scripts from the context menu of folders in Explorer, the default is false.
  • npm.scriptCodeLens.enable - Enable/disable the code lenses to run a script, the default is false.