Skip to content

Commit a38836c

Browse files
authoredNov 14, 2023
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

+7
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)
Please sign in to comment.