mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-30 17:33:50 +08:00
npm-ls: add global scope example and long alias (#17959)
This commit is contained in:
+10
-6
@@ -3,22 +3,26 @@
|
||||
> Print installed packages to `stdout`.
|
||||
> More information: <https://docs.npmjs.com/cli/npm-ls>.
|
||||
|
||||
- Print all versions of direct dependencies to `stdout`:
|
||||
- Print all versions of direct dependencies in the current project to `stdout`:
|
||||
|
||||
`npm ls`
|
||||
`npm {{[ls|list]}}`
|
||||
|
||||
- Print all installed packages including peer dependencies:
|
||||
|
||||
`npm ls {{[-a|--all]}}`
|
||||
`npm {{[ls|list]}} {{[-a|--all]}}`
|
||||
|
||||
- Print all globally installed packages:
|
||||
|
||||
`npm {{[ls|list]}} {{[-g|--global]}}`
|
||||
|
||||
- Print dependencies with extended information:
|
||||
|
||||
`npm ls {{[-l|--long]}}`
|
||||
`npm {{[ls|list]}} {{[-l|--long]}}`
|
||||
|
||||
- Print dependencies in parseable format:
|
||||
|
||||
`npm ls {{[-p|--parseable]}}`
|
||||
`npm {{[ls|list]}} {{[-p|--parseable]}}`
|
||||
|
||||
- Print dependencies in JSON format:
|
||||
|
||||
`npm ls --json`
|
||||
`npm {{[ls|list]}} --json`
|
||||
|
||||
Reference in New Issue
Block a user