Files
tldr/pages.zh/common/npm-ls.md

24 lines
431 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# npm ls
> 将已安装的包打印到 `stdout`。
> 更多信息:<https://docs.npmjs.com/cli/commands/npm-ls>。
- 将所有直接依赖的版本打印到 `stdout`
`npm ls`
- 将所有已安装的包(包括对等依赖)打印出来:
`npm ls --all`
- 打印带有扩展信息的依赖:
`npm ls --long`
- 以可解析格式打印依赖:
`npm ls --parseable`
- 以 JSON 格式打印依赖:
`npm ls --json`