diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 5dcdb9ca..f88e54fe 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -44,9 +44,20 @@ Use the following steps to ensure everything goes flawlessly: - Install the new version of the dependency. For example: `npm install --save @`. This will update the `npm-shrinkwrap.json` file. -- Run `npm run shrinkwrap`. This is a small script that ensures that operating - system specific dependencies that could get included in the previous step are - removed from `npm-shrinkwrap.json`. +- Run `npm run clean-shrinkwrap`. This is a small script that ensures that + operating system specific dependencies that could get included in the + previous step are removed from `npm-shrinkwrap.json`. + +Some npm versions seem to contain an issue were all development dependencies +will be included in `npm-shrinkwrap.json` when attempting to modify it (e.g: by +`npm install`, `npm uninstall`, etc). A bulletproof way to ensure only the +necessary dependencies get added is to run the following commands: + +```sh +make electron-develop +npm prune --production +npm shrinkwrap +``` - Commit *both* `package.json` and `npm-shrinkwrap.json`. diff --git a/package.json b/package.json index 675bd4f7..007b5202 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "lint": "npm run jslint && npm run scsslint", "changelog": "versionist", "start": "electron lib/start.js", - "shrinkwrap": "node ./scripts/shrinkwrap.js" + "clean-shrinkwrap": "node ./scripts/clean-shrinkwrap.js" }, "author": "Juan Cruz Viotti ", "license": "Apache-2.0", diff --git a/scripts/shrinkwrap.js b/scripts/clean-shrinkwrap.js similarity index 100% rename from scripts/shrinkwrap.js rename to scripts/clean-shrinkwrap.js