CLI documentation update from CI
CI User committed
May 14, 2021 at 02:40 UTC
cfe751f20944c88b6851bab570b48e8cd689c887
3 files changed
+64
-1
cli/v7
+1
-1
@@ -1 +1 @@
1
-Subproject commit 659751fafdd3615f44d060fa3afd702589dee693
1
+Subproject commit 3bd758387f0f4668ae1eb2bfe420051da2a74c8e
content/cli/v7/commands/npm-fund.md
+56
@@ -18,6 +18,7 @@ github_path: docs/content/commands/npm-fund.md
18
19
```bash
20
npm fund [<pkg>]
21
+npm fund [-w <workspace-name>]
22
```
23
24
### Description
@@ -34,6 +35,43 @@ The list will avoid duplicated entries and will stack all packages that
35
share the same url as a single entry. Thus, the list does not have the same
36
shape of the output from `npm ls`.
37
38
+#### Example
39
+
40
+### Workspaces support
41
+
42
+It's possible to filter the results to only include a single workspace and its
43
+dependencies using the `workspace` config option.
44
+
45
+#### Example:
46
+
47
+Here's an example running `npm fund` in a project with a configured
48
+workspace `a`:
49
+
50
+```bash
51
+$ npm fund
52
+test-workspaces-fund@1.0.0
53
++-- https://example.com/a
54
+| | `-- a@1.0.0
55
+| `-- https://example.com/maintainer
56
+| `-- foo@1.0.0
57
++-- https://example.com/npmcli-funding
58
+| `-- @npmcli/test-funding
59
+`-- https://example.com/org
60
+ `-- bar@2.0.0
61
+```
62
+
63
+And here is an example of the expected result when filtering only by
64
+a specific workspace `a` in the same project:
65
+
66
+```bash
67
+$ npm fund -w a
68
+test-workspaces-fund@1.0.0
69
+`-- https://example.com/a
70
+ | `-- a@1.0.0
71
+ `-- https://example.com/maintainer
72
+ `-- foo@2.0.0
73
+```
74
+
75
### Configuration
76
77
#### browser
@@ -58,6 +96,23 @@ Show information in JSON format.
96
Whether to represent the tree structure using unicode characters.
97
Set it to `false` in order to use all-ansi output.
98
99
+#### `workspace`
100
+
101
+* Default:
102
+* Type: String (can be set multiple times)
103
+
104
+Enable running a command in the context of the configured workspaces of the
105
+current project while filtering by running only the workspaces defined by
106
+this configuration option.
107
+
108
+Valid values for the `workspace` config are either:
109
+* Workspace names
110
+* Path to a workspace directory
111
+* Path to a parent workspace directory (will result to selecting all of the
112
+nested workspaces)
113
+
114
+This value is not exported to the environment for child processes.
115
+
116
#### which
117
118
* Type: Number
@@ -71,3 +126,4 @@ If there are multiple funding sources, which 1-indexed source URL to open.
126
* [npm docs](/cli/v7/commands/npm-docs)
127
* [npm ls](/cli/v7/commands/npm-ls)
128
* [npm config](/cli/v7/commands/npm-config)
129
+* [npm workspaces](/cli/v7/using-npm/workspaces)
content/cli/v7/commands/npm-publish.md
+7
@@ -57,6 +57,13 @@ by specifying a different default registry or using a
57
actually publishing to the registry. Reports the details of what would
58
have been published.
59
60
+* `[--workspaces]`: Enables workspace context while publishing. All
61
+ workspace packages will be published.
62
+
63
+* `[--workspace]`: Enables workspaces context and limits results to only
64
+ those specified by this config item. Only the packages in the
65
+ workspaces given will be published.
66
+
67
The publish will fail if the package name and version combination already
68
exists in the specified registry.
69