Install npm into build/ folder

This commit is contained in:
Kevin Sawicki 2014-05-28 18:30:27 -07:00
parent b10b8d80ae
commit d1bd2113bf
2 changed files with 4 additions and 2 deletions

View File

@ -50,8 +50,10 @@ var npmFlags = ' --userconfig=' + path.resolve('.npmrc') + ' ';
var packagesToDedupe = ['fs-plus', 'humanize-plus', 'oniguruma', 'roaster', 'season'];
var echoNewLine = process.platform == 'win32' ? 'echo.' : 'echo';
var firstNpmCommand = fs.existsSync(npmPath) ? npmPath : 'npm';
var commands = [
{command: 'npm' + npmFlags + 'install --quiet', options: {cwd: path.resolve(__dirname, '..', 'build'), ignoreStdout: true}},
{command: firstNpmCommand + npmFlags + 'install --quiet', options: {cwd: path.resolve(__dirname, '..', 'build'), ignoreStdout: true}},
{command: npmPath + npmFlags + 'install --quiet', options: {cwd: apmInstallPath, ignoreStdout: true}},
echoNewLine,
apmPath + ' clean ' + apmFlags,

View File

@ -28,7 +28,7 @@ function readEnvironmentVariables() {
}
readEnvironmentVariables();
cp.safeExec.bind(global, 'npm install npm', function() {
cp.safeExec.bind(global, 'npm install npm' {cwd: path.resolve(__dirname, '..', 'build')}, function() {
cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
if (error)
process.exit(1);