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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy