mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-10 13:58:16 +00:00
Update cheatsheets
This commit is contained in:
42
pnpm
Normal file
42
pnpm
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pnpm
|
||||
|
||||
> Fast, disk space efficient package manager for Node.js.
|
||||
> Manage Node.js projects and their module dependencies.
|
||||
> More information: <https://pnpm.io>.
|
||||
|
||||
- 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 add {{module_name}}@{{version}}`
|
||||
|
||||
- Download a package and add it to the list of [D]ev dependencies in `package.json`:
|
||||
|
||||
`pnpm add -D {{module_name}}`
|
||||
|
||||
- Download a package and install it [g]lobally:
|
||||
|
||||
`pnpm add -g {{module_name}}`
|
||||
|
||||
- Uninstall a package and remove it from the list of dependencies in `package.json`:
|
||||
|
||||
`pnpm remove {{module_name}}`
|
||||
|
||||
- Print a tree of locally installed modules:
|
||||
|
||||
`pnpm list`
|
||||
|
||||
- List top-level [g]lobally installed modules:
|
||||
|
||||
`pnpm list -g --depth={{0}}`
|
||||
Reference in New Issue
Block a user