mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-07 00:26:00 +02:00
pnpm, pnpx: add page (#5863)
This commit is contained in:
parent
67e05ebafb
commit
5ba22052b7
2 changed files with 53 additions and 0 deletions
37
pages/common/pnpm.md
Normal file
37
pages/common/pnpm.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# pnpm
|
||||
|
||||
> Fast, disk space efficient package manager for Node.js.
|
||||
> Manage Node.js projects and their module dependencies.
|
||||
> More information: <https://pnpm.io>.
|
||||
|
||||
- Interactively create a `package.json` file:
|
||||
|
||||
`pnpm init`
|
||||
|
||||
- Download all the packages listed as dependencies in `package.json`:
|
||||
|
||||
`pnpm install`
|
||||
|
||||
- Download a specific version of a package and add it to the list of dependencies in `package.json`:
|
||||
|
||||
`pnpm install {{module_name}}@{{version}}`
|
||||
|
||||
- Download a package and add it to the list of dev dependencies in `package.json`:
|
||||
|
||||
`pnpm install --dev {{module_name}}`
|
||||
|
||||
- Download a package and install it globally:
|
||||
|
||||
`pnpm install -g {{module_name}}`
|
||||
|
||||
- Uninstall a package and remove it from the list of dependencies in `package.json`:
|
||||
|
||||
`pnpm uninstall {{module_name}}`
|
||||
|
||||
- Print a tree of locally installed modules:
|
||||
|
||||
`pnpm list`
|
||||
|
||||
- List top-level [g]lobally installed modules:
|
||||
|
||||
`pnpm list -g --depth={{0}}`
|
16
pages/common/pnpx.md
Normal file
16
pages/common/pnpx.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# pnpx
|
||||
|
||||
> Directly execute binaries from npm packages, using `pnpm` instead of `npm`.
|
||||
> More information: <https://pnpm.io/pnpx-cli>.
|
||||
|
||||
- Execute the binary from a given npm module:
|
||||
|
||||
`pnpx {{module_name}}`
|
||||
|
||||
- Execute a specific binary from a given npm module, in case the module has multiple binaries:
|
||||
|
||||
`pnpx --package {{package_name}} {{module_name}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pnpx --help`
|
Loading…
Add table
Reference in a new issue