Call “npm install” automatically if package.json changed (#505)

This adds a stamp file which is used to detect whether the `package.json`
file got updated since the last `npm install`.  If so, `npm install` is run
again to update all modules to the version described in `package.json`.
This happens as a dependency of only those modules which actually need some
npm-installed module.

Setting the corresponding make variable to the empty string disables the
feature, which is used by the `make` invocation in the `prepublish` script
inside `package.json` to avoid infinite loops.  It can also be used by
developers working in an environment with reduced connectivity, as long as
they know what they are doing.
This commit is contained in:
Martin von Gagern
2016-08-24 03:05:50 +02:00
committed by Kevin Barabash
parent ec62ec39d8
commit e6de31d2d6
2 changed files with 15 additions and 10 deletions

View File

@@ -33,7 +33,7 @@
"bin": "cli.js",
"scripts": {
"test": "make lint test",
"prepublish": "make dist"
"prepublish": "make NIS= dist"
},
"dependencies": {
"match-at": "^0.1.0"