Update cheatsheets

This commit is contained in:
ivuorinen
2024-10-17 00:17:21 +00:00
parent f32d2d1ccd
commit 7d8d3edd4e
24 changed files with 307 additions and 37 deletions

25
tldr/npm-install Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# npm install
> Install node packages.
> More information: <https://docs.npmjs.com/cli/commands/npm-install>.
- Install dependencies listed in package.json:
`npm install`
- Download a specific version of a package and add it to the list of dependencies in `package.json`:
`npm install {{package_name}}@{{version}}`
- 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}}`
- Download the latest version of a package and install it globally:
`npm install {{-g|--global}} {{package_name}}`