Merge pull request #1220 from shama/grunt-cli

Prefer npm created node_modules/.bin/grunt
This commit is contained in:
Kevin Sawicki
2013-12-11 08:37:01 -08:00
3 changed files with 7 additions and 6 deletions

View File

@@ -5,8 +5,7 @@ var path = require('path');
process.chdir(path.dirname(__dirname));
cp.safeExec('node script/bootstrap', function() {
// node node_modules/grunt-cli/bin/grunt "$@"
var gruntPath = path.join('node_modules', 'grunt-cli', 'bin', 'grunt');
var args = [gruntPath].concat(process.argv.slice(2));
cp.safeSpawn(process.execPath, args, process.exit);
// node_modules/.bin/grunt "$@"
var gruntPath = path.join('node_modules', '.bin', 'grunt') + (process.platform === 'win32' ? '.cmd' : '');
cp.safeSpawn(gruntPath, process.argv.slice(2), process.exit);
});

View File

@@ -29,10 +29,11 @@ cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
if (error)
process.exit(1);
var async = require('async');
var gruntPath = path.join('node_modules', '.bin', 'grunt') + (process.platform === 'win32' ? '.cmd' : '');
async.series([
require('rimraf').bind(global, path.join(homeDir, '.atom')),
cp.safeExec.bind(global, 'git clean -dff'),
cp.safeExec.bind(global, 'node node_modules/grunt-cli/bin/grunt ci --stack --no-color'),
cp.safeExec.bind(global, gruntPath + ' ci --stack --no-color'),
cp.safeExec.bind(global, 'node_modules/.bin/coffee script/upload-release')
], function(error) {
process.exit(error ? 1 : 0);

View File

@@ -5,5 +5,6 @@ var path = require('path');
process.chdir(path.dirname(__dirname));
safeExec('node script/bootstrap', function() {
safeExec('node node_modules/grunt-cli/bin/grunt ci --stack --no-color', process.exit);
var gruntPath = path.join('node_modules', '.bin', 'grunt') + (process.platform === 'win32' ? '.cmd' : '');
safeExec(gruntPath + ' ci --stack --no-color', process.exit);
});