Skip to content

Commit

Permalink
fix(docs): clean up npm prefix docs
Browse files Browse the repository at this point in the history
Adds an example and slightly changes wording

PR-URL: #2463
Credit: @wraithgar
Close: #2463
Reviewed-by: @darcyclarke
  • Loading branch information
wraithgar committed Jan 14, 2021
1 parent 23f01b7 commit 4b43656
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/content/commands/npm-prefix.md
Expand Up @@ -12,13 +12,25 @@ npm prefix [-g]

### Description

Print the local prefix to standard out. This is the closest parent directory
Print the local prefix to standard output. This is the closest parent directory
to contain a `package.json` file or `node_modules` directory, unless `-g` is
also specified.

If `-g` is specified, this will be the value of the global prefix. See
[`npm config`](/commands/npm-config) for more detail.

### Example

```bash
npm prefix
/usr/local/projects/foo
```

```bash
npm prefix -g
/usr/local
```

### See Also

* [npm root](/commands/npm-root)
Expand Down

0 comments on commit 4b43656

Please sign in to comment.