Skip to content

Commit

Permalink
chore: auto-generate npm usage for each command
Browse files Browse the repository at this point in the history
Fixes npm#4189
  • Loading branch information
manekinekko committed Feb 21, 2022
1 parent 25fc0ee commit ccb9d31
Show file tree
Hide file tree
Showing 65 changed files with 659 additions and 229 deletions.
12 changes: 9 additions & 3 deletions docs/content/commands/npm-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,27 @@ description: Set access level on published packages

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/access.js -->

```bash
npm access public [<package>]
npm access restricted [<package>]

npm access grant <read-only|read-write> <scope:team> [<package>]
npm access revoke <scope:team> [<package>]

npm access 2fa-required [<package>]
npm access 2fa-not-required [<package>]

npm access ls-packages [<user>|<scope>|<scope:team>]
npm access ls-collaborators [<package> [<user>]]
npm access edit [<package>]
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/access.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
Used to set access controls on private packages.
Expand Down
7 changes: 2 additions & 5 deletions docs/content/commands/npm-adduser.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ description: Add a registry user account

### Synopsis

```bash
npm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy]

aliases: login, add-user
```
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

Note: This command is unaware of workspaces.

Expand Down
14 changes: 10 additions & 4 deletions docs/content/commands/npm-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ description: Run a security audit

### Synopsis

```bash
npm audit [--json] [--production] [--audit-level=(low|moderate|high|critical)]
npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/audit.js -->

common options: [--production] [--only=(dev|prod)]
```bash
npm audit [fix]
```

<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/audit.js -->

<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

### Description

The audit command submits a description of the dependencies configured in
Expand Down
5 changes: 2 additions & 3 deletions docs/content/commands/npm-bin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ description: Display npm bin folder

### Synopsis

```bash
npm bin [-g|--global]
```
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

Note: This command is unaware of workspaces.

Expand Down
13 changes: 11 additions & 2 deletions docs/content/commands/npm-bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@ description: Report bugs for a package in a web browser

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/bugs.js -->

```bash
npm bugs [<pkgname> [<pkgname> ...]]
npm bugs [<pkgname>]

aliases: issues
alias: issues
```

<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/bugs.js -->

<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

### Description

This command tries to guess at the likely location of a package's bug
Expand Down
24 changes: 16 additions & 8 deletions docs/content/commands/npm-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,26 @@ description: Manipulates packages cache

### Synopsis

```bash
npm cache add <tarball file>...
npm cache add <folder>...
npm cache add <tarball url>...
npm cache add <name>@<version>...

npm cache clean
aliases: npm cache clear, npm cache rm
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/cache.js -->

```bash
npm cache add <tarball file>
npm cache add <folder>
npm cache add <tarball url>
npm cache add <git url>
npm cache add <name>@<version>
npm cache clean [<key>]
npm cache ls [<name>@<version>]
npm cache verify
```

<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/cache.js -->

<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

Note: This command is unaware of workspaces.

### Description
Expand Down
5 changes: 2 additions & 3 deletions docs/content/commands/npm-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ description: Install a project with a clean slate

### Synopsis

```bash
npm ci
```
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

### Description

Expand Down
5 changes: 2 additions & 3 deletions docs/content/commands/npm-completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ description: Tab Completion for npm

### Synopsis

```bash
source <(npm completion)
```
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

Note: This command is unaware of workspaces.

Expand Down
11 changes: 9 additions & 2 deletions docs/content/commands/npm-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,25 @@ description: Manage the npm configuration files

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/config.js -->

```bash
npm config set <key>=<value> [<key>=<value> ...]
npm config get [<key> [<key> ...]]
npm config delete <key> [<key> ...]
npm config list [--json]
npm config edit
npm set <key>=<value> [<key>=<value> ...]
npm get [<key> [<key> ...]]

alias: c
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/config.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
Note: This command is unaware of workspaces.
### Description
Expand Down
26 changes: 20 additions & 6 deletions docs/content/commands/npm-dedupe.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ description: Reduce duplication in the package tree

### Synopsis

```bash
npm dedupe
npm ddp

aliases: ddp
```
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

### Description

Expand Down Expand Up @@ -145,6 +141,24 @@ When package package-locks are disabled, automatic pruning of extraneous
modules will also be disabled. To remove extraneous modules with
package-locks disabled use `npm prune`.
This configuration does not affect `npm ci`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
#### `save`
* Default: `true` unless when using `npm update` or `npm dedupe` where it
defaults to `false`
* Type: Boolean
Save installed packages to a `package.json` file as dependencies.
When used with the `npm rm` command, removes the dependency from
`package.json`.
Will also prevent writing to `package-lock.json` if set to `false`.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
Expand Down
11 changes: 10 additions & 1 deletion docs/content/commands/npm-deprecate.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@ description: Deprecate a version of a package

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/deprecate.js -->

```bash
npm deprecate <pkg>[@<version range>] <message>
npm deprecate <pkg>[@<version>] <message>
```

<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/deprecate.js -->

<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

Note: This command is unaware of workspaces.

### Description
Expand Down
13 changes: 9 additions & 4 deletions docs/content/commands/npm-diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ description: The registry diff command

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/diff.js -->

```bash
npm diff [...<paths>]
npm diff --diff=<pkg-name> [...<paths>]
npm diff --diff=<version-a> [--diff=<version-b>] [...<paths>]
npm diff --diff=<spec-a> [--diff=<spec-b>] [...<paths>]
npm diff [--diff-ignore-all-space] [--diff-name-only] [...<paths>]
```

<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/diff.js -->

<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

### Description

Similar to its `git diff` counterpart, this command will print diff patches
Expand Down
11 changes: 10 additions & 1 deletion docs/content/commands/npm-dist-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,23 @@ description: Modify package distribution tags

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/dist-tag.js -->

```bash
npm dist-tag add <pkg>@<version> [<tag>]
npm dist-tag rm <pkg> <tag>
npm dist-tag ls [<pkg>]

aliases: dist-tags
alias: dist-tags
```

<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/dist-tag.js -->

<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

### Description

Add, remove, and enumerate distribution tags on a package:
Expand Down
11 changes: 10 additions & 1 deletion docs/content/commands/npm-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@ description: Open documentation for a package in a web browser

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/docs.js -->

```bash
npm docs [<pkgname> [<pkgname> ...]]

aliases: home
alias: home
```
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/docs.js -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
### Description
This command tries to guess at the likely location of a package's
Expand Down
5 changes: 2 additions & 3 deletions docs/content/commands/npm-doctor.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ description: Check your npm environment

### Synopsis

```bash
npm doctor
```
<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

Note: This command is unaware of workspaces.

Expand Down
11 changes: 10 additions & 1 deletion docs/content/commands/npm-edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@ description: Edit an installed package

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/edit.js -->

```bash
npm edit <pkg>
npm edit <pkg>[/<subpkg>...]
```

<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/edit.js -->

<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

Note: This command is unaware of workspaces.

### Description
Expand Down
21 changes: 9 additions & 12 deletions docs/content/commands/npm-exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,23 @@ description: Run a command from a local or remote npm package

### Synopsis

<!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/exec.js -->

```bash
npm exec -- <pkg>[@<version>] [args...]
npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
npm exec -c '<cmd> [args...]'
npm exec --package=foo -c '<cmd> [args...]'
npm exec [--ws] [-w <workspace-name] [args...]

npx <pkg>[@<specifier>] [args...]
npx -p <pkg>[@<specifier>] <cmd> [args...]
npx -c '<cmd> [args...]'
npx -p <pkg>[@<specifier>] -c '<cmd> [args...]'
Run without --call or positional args to open interactive subshell
alias: x
```

alias: npm x, npx
<!-- automatically generated, do not edit manually -->
<!-- see lib/commands/exec.js -->

common options:
--package=<pkg> (may be specified multiple times)
-p is a shorthand for --package only when using npx executable
-c <cmd> --call=<cmd> (may not be mixed with positional arguments)
```
<!-- AUTOGENERATED USAGE DESCRIPTIONS END -->

### Description

Expand Down
Loading

0 comments on commit ccb9d31

Please sign in to comment.