vscode/extensions/npm/README.md

38 lines
1.9 KiB
Markdown
Raw Normal View History

2018-02-21 13:16:36 +01:00
# Node npm
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
## Features
2018-02-21 13:19:09 +01:00
### Task Running
2018-02-21 13:16:36 +01:00
This extension supports running npm scripts defined in the `package.json` as [tasks](https://code.visualstudio.com/docs/editor/tasks). Scripts with the name 'build', 'compile', or 'watch'
are treated as build tasks.
To run scripts as tasks, use the **Tasks** menu.
2018-02-21 13:16:36 +01:00
For more information about auto detection of Tasks, see the [documentation](https://code.visualstudio.com/Docs/editor/tasks#_task-autodetection).
2018-03-05 14:47:04 +01:00
### 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 provides code lense actions to run or debug a script from the editor.
### 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.
2018-02-21 13:16:36 +01:00
## 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: `npm` or `yarn`, the default is `npm`.
- `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`.
2018-07-24 12:17:55 +02:00
- `npm.scriptCodeLens.enable` - Enable/disable the code lenses to run a script, the default is `false`.