Skip to content

Commit 4b43656

Browse files
committed
fix(docs): clean up npm prefix docs
Adds an example and slightly changes wording PR-URL: #2463 Credit: @wraithgar Close: #2463 Reviewed-by: @darcyclarke
1 parent 23f01b7 commit 4b43656

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/content/commands/npm-prefix.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,25 @@ npm prefix [-g]
1212

1313
### Description
1414

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

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

22+
### Example
23+
24+
```bash
25+
npm prefix
26+
/usr/local/projects/foo
27+
```
28+
29+
```bash
30+
npm prefix -g
31+
/usr/local
32+
```
33+
2234
### See Also
2335

2436
* [npm root](/commands/npm-root)

0 commit comments

Comments
 (0)