0.1.4 • Published 9 years ago
shrinkwrap-check v0.1.4
shrinkwrap-check
Checks that package.json and npm-shrinkwrap.json files are always in sync so you
don't commit out-of-sync dependencies in your code.
Same as npm-shrinkwrap-check, but without deprecation notice.
installation
Install it globally running
$ npm install -g shrinkwrap-check
usage
In a folder that contains a package.json run the following command:
$ shrinkwrap-check
This will perform the following checks:
- Both
package.jsonandnpm-shrinkwrap.jsonexist. - There are no dependencies in
package.jsonthat are not contained innpm-shrinkwrap.json
options
Options:
-3, --v3 Perform check taking npm3 flat structure into account.
-d, --dev Check devDependencies.
-h, --help Show this help message.
-v, --verbose Run in verbose mode
-V, --version Outputs versionadd as git hook
It is a good practice that you add shrinkwrap-check as a git hook.
To add a pre-push hook create a .git/hooks/pre-push in your repo with the following:
#!/bin/sh
shrinkwrap-checkThis will prevent you from pushing out-of-sync package.json and npm-shrinkwrap.json files to your repo.
0.1.4
9 years ago