Update cheatsheets

This commit is contained in:
ivuorinen
2024-09-09 00:17:25 +00:00
parent 70eb9d3aae
commit 63176c5eb3
9 changed files with 51 additions and 36 deletions

View File

@@ -9,9 +9,9 @@ source: https://github.com/tldr-pages/tldr.git
> Manage Node.js projects and their module dependencies.
> More information: <https://www.npmjs.com>.
- Interactively create a `package.json` file:
- Create a `package.json` file with default values (omit --yes to do it interactively):
`npm init`
`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}} --save-dev`
`npm install {{package_name}} {{-D|--save-dev}}`
- Download the latest version of a package and install it globally:
`npm install --global {{package_name}}`
`npm install {{-g|--global}} {{package_name}}0`
- 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 top-level globally installed packages:
`npm list --global --depth={{0}}`
`npm list {{-g|--global}} --depth {{0}}`