mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-18 07:00:57 +00:00
Update cheatsheets
This commit is contained in:
8
tldr/npm
8
tldr/npm
@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a `package.json` file with default values (omit `--yes` to do it interactively):
|
||||
|
||||
`npm init {{-y|--yes}}`
|
||||
`npm init {{[-y|--yes]}}`
|
||||
|
||||
- Download all the packages listed as dependencies in `package.json`:
|
||||
|
||||
@@ -23,11 +23,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Download the latest version of a package and add it to the list of dev dependencies in `package.json`:
|
||||
|
||||
`npm install {{package_name}} {{-D|--save-dev}}`
|
||||
`npm install {{package_name}} {{[-D|--save-dev]}}`
|
||||
|
||||
- Download the latest version of a package and install it globally:
|
||||
|
||||
`npm install {{-g|--global}} {{package_name}}`
|
||||
`npm install {{[-g|--global]}} {{package_name}}`
|
||||
|
||||
- Uninstall a package and remove it from the list of dependencies in `package.json`:
|
||||
|
||||
@@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all top-level globally installed packages:
|
||||
|
||||
`npm list {{-g|--global}} --depth {{0}}`
|
||||
`npm list {{[-g|--global]}} --depth {{0}}`
|
||||
|
||||
Reference in New Issue
Block a user