Add npm-version command to npm cheatsheet (#1553)
This commit is contained in:
parent
b91885ec71
commit
6b4c9ef35d
5
npm.md
5
npm.md
|
@ -17,6 +17,11 @@ updated: 2019-12-24
|
|||
| `npm install lodash` | Install a package |
|
||||
| `npm install --save-dev lodash` | Install as devDependency |
|
||||
| `npm install --save-exact lodash` | Install with exact |
|
||||
| --- | --- |
|
||||
| `npm version 1.2.3` | Bump the package version to 1.2.3 |
|
||||
| `npm version major` | Bump the major package version by 1 (1.2.3 → 2.0.0) |
|
||||
| `npm version minor` | Bump the minor package version by 1 (1.2.3 → 1.3.0) |
|
||||
| `npm version patch` | Bump the patch package version by 1 (1.2.3 → 1.2.4) |
|
||||
|
||||
|
||||
`--save` is the default as of npm@5. Previously, using `npm install` without `--save` doesn't update package.json.
|
||||
|
|
Loading…
Reference in New Issue