diff options
author | Gar <gar+gh@danger.computer> | 2021-03-19 21:56:18 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-03-22 20:17:57 +0300 |
commit | b876442241b9d366a0541714bbee1ae50d6746fd (patch) | |
tree | a4849bd374d9786f6c7d2ae4e4c74c62d0c35db8 /docs | |
parent | 629aaf394c4fa01b79a77d43489baca6492bce9a (diff) |
fix(usage): tie usage to config
This starts us down the path of tying the params our commands accept to
their config items. For now it is optional, and not every current
config item would cleanly render if we added them today.
The ones that are added here DO render nicely, and we can iterate from
here. We can also at a later date do the same kind of appraoch with our
positional args.
PR-URL: https://github.com/npm/cli/pull/2908
Credit: @wraithgar
Close: #2908
Reviewed-by: @nlf, @isaacs
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/using-npm/config.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 435f9cee2..1eedc26a5 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -96,6 +96,8 @@ The following shorthands are parsed on the command-line: * `-H`: `--usage` * `--help`: `--usage` * `-v`: `--version` +* `-w`: `--workspace` +* `--ws`: `--workspaces` * `-y`: `--yes` <!-- AUTOGENERATED CONFIG SHORTHANDS END --> @@ -1311,6 +1313,34 @@ The program to use to view help content. Set to `"browser"` to view html help content in the default web browser. +#### `which` + +* Default: null +* Type: null or Number + +If there are multiple funding sources, which 1-indexed source URL to open. + +#### `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) + +#### `workspaces` + +* Default: false +* Type: Boolean + +Enable running a command in the context of **all** the configured +workspaces. + #### `yes` * Default: false |