Content-Length: 264591 | pFad | https://github.com/npm/cli/commit/a38836ce9d703f5012ff4d4a8a4e3b9a9aedc025

63 docs: add path usage for view command (#6616) · npm/cli@a38836c · GitHub
Skip to content

Commit a38836c

Browse files
authored
docs: add path usage for view command (#6616)
Document how to target the current project context using the path `.`, so that field data about a local project can be viewed.
1 parent cd291e7 commit a38836c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/lib/content/commands/npm-view.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ For example, to show the dependencies of the `ronn` package at version
2828
npm view ronn@0.3.5 dependencies
2929
```
3030

31+
By default, `npm view` shows data about the current project context (by looking for a `package.json`).
32+
To show field data for the current project use a file path (i.e. `.`):
33+
34+
```bash
35+
npm view . dependencies
36+
```
37+
3138
You can view child fields by separating them with a period.
3239
To view the git repository URL for the latest version of `npm`, you would run the following command:
3340

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/npm/cli/commit/a38836ce9d703f5012ff4d4a8a4e3b9a9aedc025

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy