mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-07 10:57:09 +00:00
Update cheatsheets
This commit is contained in:
25
tldr/npm-install
Normal file
25
tldr/npm-install
Normal 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}}`
|
||||
Reference in New Issue
Block a user