mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
637 B
Plaintext
26 lines
637 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# npm explain
|
|
|
|
> Explain how a package is installed, detailing its dependencies and reasons for inclusion.
|
|
> More information: <https://docs.npmjs.com/cli/explain/>.
|
|
|
|
- Explain why a specific package is installed:
|
|
|
|
`npm {{[why|explain]}} {{package_name}}`
|
|
|
|
- Show explanation in JSON format:
|
|
|
|
`npm {{[why|explain]}} {{package_name}} --json`
|
|
|
|
- Include peer dependencies in the explanation:
|
|
|
|
`npm {{[why|explain]}} {{package_name}} --include peer`
|
|
|
|
- Limit explanation depth to 2 levels deep:
|
|
|
|
`npm {{[why|explain]}} {{package_name}} --depth 2`
|