Skip to content

Commit

Permalink
docs: add path usage for view command (#6616)
Browse files Browse the repository at this point in the history
Document how to target the current project context using the path `.`, so that field data about a local project can be viewed.
  • Loading branch information
RobinKnipe authored Nov 14, 2023
1 parent cd291e7 commit a38836c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/lib/content/commands/npm-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ For example, to show the dependencies of the `ronn` package at version
npm view ronn@0.3.5 dependencies
```

By default, `npm view` shows data about the current project context (by looking for a `package.json`).
To show field data for the current project use a file path (i.e. `.`):

```bash
npm view . dependencies
```

You can view child fields by separating them with a period.
To view the git repository URL for the latest version of `npm`, you would run the following command:

Expand Down

0 comments on commit a38836c

Please sign in to comment.