build(npm): short-circuit npm install if node_modules are healthy

Closes #8627
This commit is contained in:
Pawel Kozlowski
2016-05-13 01:01:33 +02:00
parent 4ddf5536b4
commit 05266241af
4 changed files with 3 additions and 18 deletions

View File

@ -18,12 +18,7 @@ function checkNodeModules(logOutput, purgeIfStale) {
if (logOutput) console.error(':-( npm dependencies are stale or in an in unknown state!');
if (purgeIfStale) {
if (logOutput) console.log(' purging...');
var nodeModulesPath = path.join(PROJECT_ROOT, 'node_modules');
if (fs.existsSync(nodeModulesPath)) {
_deleteDir(nodeModulesPath);
}
_deleteDir(path.join(PROJECT_ROOT, 'node_modules'));
}
}