Skip to content

Commit

Permalink
CLI documentation update from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
CI User committed May 14, 2021
1 parent 9aae121 commit cfe751f
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
56 changes: 56 additions & 0 deletions content/cli/v7/commands/npm-fund.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ github_path: docs/content/commands/npm-fund.md

```bash
npm fund [<pkg>]
npm fund [-w <workspace-name>]
```

### Description
Expand All @@ -34,6 +35,43 @@ The list will avoid duplicated entries and will stack all packages that
share the same url as a single entry. Thus, the list does not have the same
shape of the output from `npm ls`.

#### Example

### Workspaces support

It's possible to filter the results to only include a single workspace and its
dependencies using the `workspace` config option.

#### Example:

Here's an example running `npm fund` in a project with a configured
workspace `a`:

```bash
$ npm fund
[email protected]
+-- https://example.com/a
| | `-- [email protected]
| `-- https://example.com/maintainer
| `-- [email protected]
+-- https://example.com/npmcli-funding
| `-- @npmcli/test-funding
`-- https://example.com/org
`-- [email protected]
```

And here is an example of the expected result when filtering only by
a specific workspace `a` in the same project:

```bash
$ npm fund -w a
[email protected]
`-- https://example.com/a
| `-- [email protected]
`-- https://example.com/maintainer
`-- [email protected]
```

### Configuration

#### browser
Expand All @@ -58,6 +96,23 @@ Show information in JSON format.
Whether to represent the tree structure using unicode characters.
Set it to `false` in order to use all-ansi output.

#### `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)

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

#### which

* Type: Number
Expand All @@ -71,3 +126,4 @@ If there are multiple funding sources, which 1-indexed source URL to open.
* [npm docs](/cli/v7/commands/npm-docs)
* [npm ls](/cli/v7/commands/npm-ls)
* [npm config](/cli/v7/commands/npm-config)
* [npm workspaces](/cli/v7/using-npm/workspaces)
7 changes: 7 additions & 0 deletions content/cli/v7/commands/npm-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ by specifying a different default registry or using a
actually publishing to the registry. Reports the details of what would
have been published.
* `[--workspaces]`: Enables workspace context while publishing. All
workspace packages will be published.
* `[--workspace]`: Enables workspaces context and limits results to only
those specified by this config item. Only the packages in the
workspaces given will be published.
The publish will fail if the package name and version combination already
exists in the specified registry.
Expand Down

0 comments on commit cfe751f

Please sign in to comment.