Clean out node_modules between builds

This is a temporary workaround while a dedupe PR is in process

Refs #5489
This commit is contained in:
Kevin Sawicki 2015-02-11 11:29:56 -08:00
parent 67fd52131d
commit e53004c70c

View File

@ -30,7 +30,17 @@ function readEnvironmentVariables() {
}
}
function removeNodeModules() {
try {
require('fs-plus').removeSync(path.resolve(__dirname, '..', 'node_modules'));
} catch (error) {
console.error(error.message);
process.exit(1);
}
}
readEnvironmentVariables();
removeNodeModules();
cp.safeExec.bind(global, 'npm install npm', {cwd: path.resolve(__dirname, '..', 'build')}, function() {
cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
if (error)