build: make 'npm install' work reliably and issue build warning when node_modules look stale

This is done a in bit kludgy way on purpose so that it works on Windows and CI.

Works around npm/npm#8452.

Closes #2038
This commit is contained in:
Igor Minar
2015-06-05 23:37:09 -07:00
parent 4d338a4f5c
commit 7140c9cc34
8 changed files with 118 additions and 51 deletions

7
tools/npm/check-node-modules Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env node
var checkNpm = require('./check-node-modules.js');
var purgeIfStale = (process.argv.indexOf('--purge') !== -1)
checkNpm(true, purgeIfStale);