"npm run lock" command

Uses https://github.com/uber/npm-shrinkwrap instead of the built-in "npm shrinkwrap" since it works more reliably.
Specifically, "npm install" doesn't fail depending on node_modules/ being installed in the local cache or not.
It also makes npm-shrinkwrap.json easier to diff by more consistently ordering its output between runs.

If you need any convincing that this is a problem, look at the over 400 issues related to "shrinkwrap"
in https://github.com/npm/npm/search?q=shrinkwrap&type=Issues&utf8=%E2%9C%93
This commit is contained in:
Ingo Schommer 2016-02-29 20:47:02 +13:00
parent adf356a6a5
commit 2a3f4daa76
3 changed files with 10045 additions and 120 deletions

View File

@ -301,6 +301,16 @@ $ npm run sprites
This script generates sprites from the individual image files in `admin/images/sprites/src`.
```
$ npm run lock
```
Generates a "shrinkwrap" file containing all npm package versions and writes it to `npm-shrinkwrap.json`.
Run this command whenever a new package is added to `package.json`, or when updating packages.
Commit the resulting `npm-shrinkwrap.json`. This uses
a third party [npm-shrinkwrap](https://github.com/uber/npm-shrinkwrap) library
since the built-in `npm shrinkwrap` (without a dash) has proven unreliable.
Of course to run these scripts, you'll need to get the dependencies, so run a `npm install` from the root directory to get started.
### Gulp

10149
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,8 @@
"sanity": "gulp sanity",
"thirdparty": "gulp thirdparty",
"css": "gulp css",
"sprites": "gulp sprites"
"sprites": "gulp sprites",
"lock": "npm-shrinkwrap --dev"
},
"repository": {
"type": "git",
@ -44,9 +45,9 @@
"gulp-diff": "^1.0.0",
"gulp-if": "^2.0.0",
"gulp-notify": "^2.2.0",
"gulp-postcss": "^6.0.1",
"gulp-sass": "^2.1.1",
"gulp-sourcemaps": "^1.6.0",
"gulp-postcss": "^6.0.1",
"gulp-uglify": "^1.5.1",
"gulp-util": "^3.0.7",
"semver": "^5.1.0",
@ -63,6 +64,7 @@
"bootstrap": "^4.0.0-alpha.2",
"isomorphic-fetch": "^2.2.1",
"jquery-sizes": "^0.33.0",
"npm-shrinkwrap": "^5.4.1",
"react": "^0.14.6",
"react-addons-test-utils": "^0.14.6",
"react-dom": "^0.14.6",