improve docs for shrinkwrap (#565)

This commit is contained in:
Cliff Meyers 2016-10-13 20:44:57 -04:00 committed by Michael Neale
parent 5686ec1f5f
commit 3d14e84406
1 changed files with 7 additions and 2 deletions

View File

@ -101,13 +101,18 @@ __NOTE__: look in the README.md of the respective modules for more detailed dev
### NPM and shrinkwrap
- Ensure your npm is 3.10.8+ as this release fixes some important bugs with shrinkwrap, notably #11735 in [notes](https://github.com/npm/npm/releases/tag/v3.10.8)
- Don't edit package.json directly; use npm install to ensure that both package.json and npm-shrinkwrap.json are updated.
- To add or update a dependency:
- `npm install packageName@3.2.1 --save -E`
- `npm install packageName@3.2.1 -S -E`
- To add or update a devDependency:
- `npm install packageName@3.2.1 --saveDev -E`
- `npm install packageName@3.2.1 -D -E`
- If you are handling a merge conflict in package.json, resolve the conflict in the file as normal. Then use
the appropriate command to update each conflicting dependency to ensure shrinkwrap is updated.
- To remove a dependency:
- `npm uninstall packageName -S`
- To remove a devDependency:
- `npm uninstall packageName -D`
- If you ever need to create a shrinkwrap for the first time, use `npm shrinkwrap --dev` to ensure devDependencies are
included in the shrinkwrap.