Update cheatsheets

This commit is contained in:
ivuorinen
2025-09-04 00:18:21 +00:00
parent 46b75bdb29
commit 7bb915f683
11 changed files with 192 additions and 17 deletions

View File

@@ -8,22 +8,26 @@ source: https://github.com/tldr-pages/tldr.git
> 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`