Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2021-05-14 23:37:47 +0300
committerisaacs <i@izs.me>2021-05-20 21:06:50 +0300
commitc18626f047e3a0fedd3c86554a4a0a8f27925e77 (patch)
tree04bf1c9118e93ee350ebb959b801ecce08f9d413 /docs
parentb3add87e686968b7af3067c685d2561baf90e397 (diff)
feat: add ls workspaces
- Add listing workspaces deps by default in `npm ls` - Add ability to filter the result tree by workspace using the -w config - Added tests and docs Fixes: https://github.com/npm/statusboard/issues/302 PR-URL: https://github.com/npm/cli/pull/3250 Credit: @ruyadorno Close: #3250 Reviewed-by: @isaacs
Diffstat (limited to 'docs')
-rw-r--r--docs/content/commands/npm-ls.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/content/commands/npm-ls.md b/docs/content/commands/npm-ls.md
index 505dfd9c4..3c6621763 100644
--- a/docs/content/commands/npm-ls.md
+++ b/docs/content/commands/npm-ls.md
@@ -177,6 +177,38 @@ When used with `npm ls`, only show packages that are linked.
When set to true, npm uses unicode characters in the tree output. When
false, it uses ascii characters instead of unicode glyphs.
+#### `workspace`
+
+* Default:
+* Type: String (can be set multiple times)
+
+Enable running a command in the context of the configured workspaces of the
+current project while filtering by running only the workspaces defined by
+this configuration option.
+
+Valid values for the `workspace` config are either:
+
+* Workspace names
+* Path to a workspace directory
+* Path to a parent workspace directory (will result to selecting all of the
+ nested workspaces)
+
+When set for the `npm init` command, this may be set to the folder of a
+workspace which does not yet exist, to create the folder and set it up as a
+brand new workspace within the project.
+
+This value is not exported to the environment for child processes.
+
+#### `workspaces`
+
+* Default: false
+* Type: Boolean
+
+Enable running a command in the context of **all** the configured
+workspaces.
+
+This value is not exported to the environment for child processes.
+
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
### See Also