CLI documentation update from CI
CI User committed
May 28, 2021 at 03:10 UTC
19735ebcc66e6d9669f69bf640b8d2a77a8f7c4e
6 files changed
+57
-8
cli/v7
+1
-1
@@ -1 +1 @@
1
-Subproject commit a3f50fde82716088eeea796385563ab5bd3b3222
1
+Subproject commit 97a898dd2c0b41cd75fc5d175a176e59a8f5480f
content/cli/v7/commands/npm-link.md
+42
@@ -109,6 +109,16 @@ relevant metadata by running `npm install <dep> --package-lock-only`.
109
If you _want_ to save the `file:` reference in your `package.json` and
110
`package-lock.json` files, you can use `npm link <dep> --save` to do so.
111
112
+### Workspace Usage
113
+
114
+`npm link <pkg> --workspace <name>` will link the relevant package as a
115
+dependency of the specified workspace(s). Note that It may actually be
116
+linked into the parent project's `node_modules` folder, if there are no
117
+conflicting dependencies.
118
+
119
+`npm link --workspace <name>` will create a global link to the specified
120
+workspace(s).
121
+
122
### Configuration
123
124
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
@@ -271,6 +281,38 @@ commands that modify your local installation, eg, `install`, `update`,
281
Note: This is NOT honored by other network related commands, eg `dist-tags`,
282
`owner`, etc.
283
284
+#### `workspace`
285
+
286
+* Default:
287
+* Type: String (can be set multiple times)
288
+
289
+Enable running a command in the context of the configured workspaces of the
290
+current project while filtering by running only the workspaces defined by
291
+this configuration option.
292
+
293
+Valid values for the `workspace` config are either:
294
+
295
+* Workspace names
296
+* Path to a workspace directory
297
+* Path to a parent workspace directory (will result to selecting all of the
298
+ nested workspaces)
299
+
300
+When set for the `npm init` command, this may be set to the folder of a
301
+workspace which does not yet exist, to create the folder and set it up as a
302
+brand new workspace within the project.
303
+
304
+This value is not exported to the environment for child processes.
305
+
306
+#### `workspaces`
307
+
308
+* Default: false
309
+* Type: Boolean
310
+
311
+Enable running a command in the context of **all** the configured
312
+workspaces.
313
+
314
+This value is not exported to the environment for child processes.
315
+
316
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
317
318
### See Also
content/cli/v7/commands/npm-pack.md
+9
@@ -37,6 +37,15 @@ commands that modify your local installation, eg, `install`, `update`,
37
Note: This is NOT honored by other network related commands, eg `dist-tags`,
38
`owner`, etc.
39
40
+#### `json`
41
+
42
+* Default: false
43
+* Type: Boolean
44
+
45
+Whether or not to output JSON data, rather than the normal output.
46
+
47
+Not supported by all npm commands.
48
+
49
#### `workspace`
50
51
* Default:
content/cli/v7/commands/npm.md
+2
-4
@@ -71,10 +71,8 @@ requires compiling of C++ Code, npm will use
71
[node-gyp](https://github.com/nodejs/node-gyp) for that task.
72
For a Unix system, [node-gyp](https://github.com/nodejs/node-gyp)
73
needs Python, make and a buildchain like GCC. On Windows,
74
-Python and Microsoft Visual Studio C++ are needed. Python 3 is
75
-not supported by [node-gyp](https://github.com/nodejs/node-gyp).
76
-For more information visit
77
-[the node-gyp repository](https://github.com/nodejs/node-gyp) and
74
+Python and Microsoft Visual Studio C++ are needed. For more information
75
+visit [the node-gyp repository](https://github.com/nodejs/node-gyp) and
76
the [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki).
77
78
### Directories
content/cli/v7/configuring-npm/package-lock-json.md
+2
-2
@@ -44,8 +44,8 @@ various purposes:
44
Both of these files have the same format, and perform similar functions in
45
the root of a project.
46
47
-The difference is that `package-lock.json` is that it cannot be published,
48
-and it will be ignored if found in any place other than the root project.
47
+The difference is that `package-lock.json` cannot be published, and it will
48
+be ignored if found in any place other than the root project.
49
50
In contrast, [npm-shrinkwrap.json](/cli/v7/configuring-npm/npm-shrinkwrap-json) allows
51
publication, and defines the dependency tree from the point encountered.
content/cli/v7/using-npm/scripts.md
+1
-1
@@ -312,7 +312,7 @@ For example, if your package.json contains this:
312
{
313
"scripts" : {
314
"install" : "scripts/install.js",
315
- "postinstall" : "scripts/postinstall.js",
315
+ "postinstall" : "scripts/install.js",
316
"uninstall" : "scripts/uninstall.js"
317
}
318
}