Skip to content

Commit 12b0c65

Browse files
committed
CLI documentation update from CI
1 parent fde0473 commit 12b0c65

35 files changed

+162
-72
lines changed

cli-cache.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"v8": "aa8fff11cdab94fff1a2160ee5241f5f4632e96b",
33
"v9": "64763a341e7aa5b456e696f956759bf9b3440dc1",
44
"v10": "e510f14bf6a20d67e7b37c3f25ff271d9f7a0da5",
5-
"v11": "b5173d13c182efa5434ef4ca413e62ce1437f47a"
5+
"v11": "3d90a4936ec3324ff5b1642b20588c6d57ab04a5"
66
}

content/cli/v11/commands/npm-adduser.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Note: This command is unaware of workspaces.
4949

5050
Create a new user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`registry`](/cli/v11/using-npm/registry)).
5151

52+
When you run `npm adduser`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).
53+
5254
When using `legacy` for your `auth-type`, the username, password, and email are read in from prompts.
5355

5456
### Configuration

content/cli/v11/commands/npm-audit.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ Note that this will generally make installs run slower, and be much noisier, but
323323

324324
If true, npm does not run scripts specified in package.json files.
325325

326-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
326+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
327327

328328
#### `workspace`
329329

content/cli/v11/commands/npm-ci.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Note that this will generally make installs run slower, and be much noisier, but
163163

164164
If true, npm does not run scripts specified in package.json files.
165165

166-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
166+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
167167

168168
#### `audit`
169169

content/cli/v11/commands/npm-dedupe.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Dependency types specified in `--include` will not be omitted, regardless of the
166166
167167
If true, npm does not run scripts specified in package.json files.
168168
169-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
169+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
170170
171171
#### `audit`
172172

content/cli/v11/commands/npm-exec.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Run scripts in the context of all configured workspaces for the current project.
293293

294294
### See Also
295295

296-
- [npm run-script](/cli/v11/commands/npm-run-script)
296+
- [npm run](/cli/v11/commands/npm-run)
297297
- [npm scripts](/cli/v11/using-npm/scripts)
298298
- [npm test](/cli/v11/commands/npm-test)
299299
- [npm start](/cli/v11/commands/npm-start)

content/cli/v11/commands/npm-find-dupes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Dependency types specified in `--include` will not be omitted, regardless of the
119119

120120
If true, npm does not run scripts specified in package.json files.
121121

122-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
122+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
123123

124124
#### `audit`
125125

content/cli/v11/commands/npm-init.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ Generate it without having it ask any questions:
103103
$ npm init -y
104104
```
105105

106+
Set the private flag to `true` in package.json:
107+
108+
```bash
109+
$ npm init --init-private -y
110+
```
111+
106112
### Workspaces support
107113

108114
It's possible to create a new workspace within your project by using the `workspace` config option. When using `npm init -w <dir>` the cli will create the folders and boilerplate expected while also adding a reference to your project `package.json` `"workspaces": []` property in order to make sure that new generated **workspace** is properly set up as such.
@@ -194,6 +200,13 @@ The value that `npm init` should use by default for the package.json type field.
194200

195201
The value that `npm init` should use by default for the package version number, if not already set in package.json.
196202

203+
#### `init-private`
204+
205+
- Default: false
206+
- Type: Boolean
207+
208+
The value `npm init` should use by default for the package's private flag.
209+
197210
#### `yes`
198211

199212
- Default: null

content/cli/v11/commands/npm-install-ci-test.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Note that this will generally make installs run slower, and be much noisier, but
123123

124124
If true, npm does not run scripts specified in package.json files.
125125

126-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
126+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
127127

128128
#### `audit`
129129

content/cli/v11/commands/npm-install-test.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Note that this will generally make installs run slower, and be much noisier, but
177177

178178
If true, npm does not run scripts specified in package.json files.
179179

180-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
180+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
181181

182182
#### `audit`
183183

content/cli/v11/commands/npm-install.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ Note that this will generally make installs run slower, and be much noisier, but
460460
461461
If true, npm does not run scripts specified in package.json files.
462462
463-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
463+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
464464
465465
#### `audit`
466466

content/cli/v11/commands/npm-link.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Dependency types specified in `--include` will not be omitted, regardless of the
211211

212212
If true, npm does not run scripts specified in package.json files.
213213

214-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
214+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
215215

216216
#### `audit`
217217

content/cli/v11/commands/npm-login.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Note: This command is unaware of workspaces.
4747

4848
Verify a user in the specified registry, and save the credentials to the `.npmrc` file. If no registry is specified, the default registry will be used (see [`config`](/cli/v11/using-npm/config)).
4949

50+
When you run `npm login`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).
51+
5052
When using `legacy` for your `auth-type`, the username and password, are read in from prompts.
5153

5254
To reset your password, go to [https://www.npmjs.com/forgot](https://www.npmjs.com/forgot)

content/cli/v11/commands/npm-ls.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Note: to get a "bottoms up" view of why a given package is included in the tree
5252
Positional arguments are `name@version-range` identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will _also_ show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show:
5353

5454
```bash
55-
npm@11.3.0 /path/to/npm
55+
npm@11.4.0 /path/to/npm
5656
└─┬ init-package-json@0.0.4
5757
└── promzard@0.1.5
5858
```

content/cli/v11/commands/npm-outdated.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ In the output:
5555
- `depended by` shows which package depends on the displayed dependency
5656
- `package type` (when using `--long` / `-l`) tells you whether this package is a `dependency` or a dev/peer/optional dependency. Packages not included in `package.json` are always marked `dependencies`.
5757
- `homepage` (when using `--long` / `-l`) is the `homepage` value contained in the package's packument
58+
- `depended by location` (when using `--long` / `-l`) shows location of the package that depends on the displayed dependency
5859
- Red means there's a newer version matching your semver requirements, so you should update now.
5960
- Yellow indicates that there's a newer version _above_ your semver requirements (usually new major, or new 0.x minor) so proceed with caution.
6061

content/cli/v11/commands/npm-pack.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ This value is not exported to the environment for child processes.
118118

119119
If true, npm does not run scripts specified in package.json files.
120120

121-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
121+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
122122

123123
### Description
124124

content/cli/v11/commands/npm-prune.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Note that this will generally make installs run slower, and be much noisier, but
117117

118118
If true, npm does not run scripts specified in package.json files.
119119

120-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
120+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
121121

122122
#### `workspace`
123123

content/cli/v11/commands/npm-rebuild.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Note that this will generally make installs run slower, and be much noisier, but
107107

108108
If true, npm does not run scripts specified in package.json files.
109109

110-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
110+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
111111

112112
#### `workspace`
113113

content/cli/v11/commands/npm-restart.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ npm restart [-- <args>]
4343

4444
### Description
4545

46-
This restarts a project. It is equivalent to running `npm run-script restart`.
46+
This restarts a project. It is equivalent to running `npm run restart`.
4747

4848
If the current project has a `"restart"` script specified in `package.json`, then the following scripts will be run:
4949

@@ -71,7 +71,7 @@ If it does _not_ have a `"restart"` script specified, but it does have `stop` an
7171

7272
If true, npm does not run scripts specified in package.json files.
7373

74-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
74+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
7575

7676
#### `script-shell`
7777

@@ -82,7 +82,7 @@ The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <p
8282

8383
### See Also
8484

85-
- [npm run-script](/cli/v11/commands/npm-run-script)
85+
- [npm run](/cli/v11/commands/npm-run)
8686
- [npm scripts](/cli/v11/using-npm/scripts)
8787
- [npm test](/cli/v11/commands/npm-test)
8888
- [npm start](/cli/v11/commands/npm-start)

content/cli/v11/commands/npm-run-script.mdx renamed to content/cli/v11/commands/npm-run.mdx

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
---
2-
title: npm-run-script
2+
title: npm-run
33
section: 1
44
description: Run arbitrary package scripts
55
github_repo: npm/cli
66
github_branch: latest
7-
github_path: docs/lib/content/commands/npm-run-script.md
7+
github_path: docs/lib/content/commands/npm-run.md
88
redirect_from:
9-
- /cli-commands/npm-run-script
10-
- /cli-commands/run-script
11-
- /cli-documentation/cli-commands/npm-run-script
12-
- /cli-documentation/cli-commands/run-script
13-
- /cli-documentation/commands/npm-run-script
14-
- /cli-documentation/commands/run-script
15-
- /cli-documentation/npm-run-script
16-
- /cli-documentation/run-script
17-
- /cli-documentation/v11/cli-commands/npm-run-script
18-
- /cli-documentation/v11/cli-commands/run-script
19-
- /cli-documentation/v11/commands/npm-run-script
20-
- /cli-documentation/v11/commands/run-script
21-
- /cli-documentation/v11/npm-run-script
22-
- /cli-documentation/v11/run-script
23-
- /cli/cli-commands/npm-run-script
24-
- /cli/cli-commands/run-script
25-
- /cli/commands/npm-run-script
26-
- /cli/commands/run-script
27-
- /cli/npm-run-script
28-
- /cli/run-script
29-
- /cli/v11/cli-commands/npm-run-script
30-
- /cli/v11/cli-commands/run-script
31-
- /cli/v11/commands/run-script
32-
- /cli/v11/npm-run-script
33-
- /cli/v11/run-script
34-
- /commands/npm-run-script
35-
- /commands/run-script
9+
- /cli-commands/npm-run
10+
- /cli-commands/run
11+
- /cli-documentation/cli-commands/npm-run
12+
- /cli-documentation/cli-commands/run
13+
- /cli-documentation/commands/npm-run
14+
- /cli-documentation/commands/run
15+
- /cli-documentation/npm-run
16+
- /cli-documentation/run
17+
- /cli-documentation/v11/cli-commands/npm-run
18+
- /cli-documentation/v11/cli-commands/run
19+
- /cli-documentation/v11/commands/npm-run
20+
- /cli-documentation/v11/commands/run
21+
- /cli-documentation/v11/npm-run
22+
- /cli-documentation/v11/run
23+
- /cli/cli-commands/npm-run
24+
- /cli/cli-commands/run
25+
- /cli/commands/npm-run
26+
- /cli/commands/run
27+
- /cli/npm-run
28+
- /cli/run
29+
- /cli/v11/cli-commands/npm-run
30+
- /cli/v11/cli-commands/run
31+
- /cli/v11/commands/run
32+
- /cli/v11/npm-run
33+
- /cli/v11/run
34+
- /commands/npm-run
35+
- /commands/run
3636
---
3737

3838
### Synopsis
3939

4040
```bash
41-
npm run-script <command> [-- <args>]
41+
npm run <command> [-- <args>]
4242

43-
aliases: run, rum, urn
43+
aliases: run-script, rum, urn
4444
```
4545

4646
### Description
@@ -177,7 +177,7 @@ This value is not exported to the environment for child processes.
177177
- Default: false
178178
- Type: Boolean
179179

180-
If true, npm will not exit with an error code when `run-script` is invoked for a script that isn't defined in the `scripts` section of `package.json`. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup.
180+
If true, npm will not exit with an error code when `run` is invoked for a script that isn't defined in the `scripts` section of `package.json`. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup.
181181

182182
This value is not exported to the environment for child processes.
183183

@@ -188,7 +188,7 @@ This value is not exported to the environment for child processes.
188188

189189
If true, npm does not run scripts specified in package.json files.
190190

191-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
191+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
192192

193193
#### `foreground-scripts`
194194

content/cli/v11/commands/npm-shrinkwrap.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This command repurposes `package-lock.json` into a publishable `npm-shrinkwrap.j
5050
### See Also
5151

5252
- [npm install](/cli/v11/commands/npm-install)
53-
- [npm run-script](/cli/v11/commands/npm-run-script)
53+
- [npm run](/cli/v11/commands/npm-run)
5454
- [npm scripts](/cli/v11/using-npm/scripts)
5555
- [package.json](/cli/v11/configuring-npm/package-json)
5656
- [package-lock.json](/cli/v11/configuring-npm/package-lock-json)

content/cli/v11/commands/npm-start.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ If the `"scripts"` object does not define a `"start"` property, npm will run `no
4949

5050
Note that this is different from the default node behavior of running the file specified in a package's `"main"` attribute when evoking with `node .`
5151

52-
As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can use custom arguments when executing scripts. Refer to [`npm run-script`](/cli/v11/commands/npm-run-script) for more details.
52+
As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can use custom arguments when executing scripts. Refer to [`npm run`](/cli/v11/commands/npm-run) for more details.
5353

5454
### Example
5555

@@ -80,7 +80,7 @@ npm start
8080

8181
If true, npm does not run scripts specified in package.json files.
8282

83-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
83+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
8484

8585
#### `script-shell`
8686

@@ -91,7 +91,7 @@ The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <p
9191

9292
### See Also
9393

94-
- [npm run-script](/cli/v11/commands/npm-run-script)
94+
- [npm run](/cli/v11/commands/npm-run)
9595
- [npm scripts](/cli/v11/using-npm/scripts)
9696
- [npm test](/cli/v11/commands/npm-test)
9797
- [npm restart](/cli/v11/commands/npm-restart)

content/cli/v11/commands/npm-stop.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ npm stop
7676

7777
If true, npm does not run scripts specified in package.json files.
7878

79-
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
79+
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
8080

8181
#### `script-shell`
8282

@@ -87,7 +87,7 @@ The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <p
8787

8888
### See Also
8989

90-
- [npm run-script](/cli/v11/commands/npm-run-script)
90+
- [npm run](/cli/v11/commands/npm-run)
9191
- [npm scripts](/cli/v11/using-npm/scripts)
9292
- [npm test](/cli/v11/commands/npm-test)
9393
- [npm start](/cli/v11/commands/npm-start)

0 commit comments

Comments
 (0)