parent
4da6b9adbe
commit
27d8585107
10
npm.md
10
npm.md
|
@ -12,11 +12,13 @@ updated: 2017-10-27
|
|||
| --- | --- |
|
||||
| `npm i` | Alias for `npm install` |
|
||||
| `npm install` | Install everything in package.json |
|
||||
| `npm install --production` | Install everything in package.json, except devDependecies |
|
||||
| --- | --- |
|
||||
| `npm install lodash` | Install a package |
|
||||
| `npm install --save-dev lodash` | Install as devDependency |
|
||||
| `npm install --save-exact lodash` | Install with exact |
|
||||
|
||||
|
||||
`--save` is the default as of npm@5. Previously, using `npm install` without `--save` doesn't update package.json.
|
||||
|
||||
### Install names
|
||||
|
@ -39,6 +41,14 @@ updated: 2017-10-27
|
|||
| `npm i ./archive.tgz` | Tarball |
|
||||
| `npm i https://site.com/archive.tgz` | Tarball via HTTP |
|
||||
|
||||
### Listing
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `npm list` | Lists the installed versions of all dependencies in this software |
|
||||
| `npm list -g --depth 0` | Lists the installed versions of all globally installed packages |
|
||||
| `npm view` | Lists the latest versions of all dependencies in this software |
|
||||
| `npm outdated` | Lists only the dependencies in this software which are outdated |
|
||||
|
||||
### Updating
|
||||
|
||||
| Command | Description |
|
||||
|
|
Loading…
Reference in New Issue