Files
atom/script/utils/run-grunt.js
Jussi Kalliokoski 9944e660ed 🎨 💚 Fixed the test script.
Also removed duplicated logic to run grunt.
2015-04-04 01:11:06 +03:00

18 lines
620 B
JavaScript

var cp = require('./child-process-wrapper.js');
var fs = require('fs');
var path = require('path');
module.exports = function(additionalArgs, callback) {
var gruntPath = path.join('build', 'node_modules', '.bin', 'grunt') + (process.platform === 'win32' ? '.cmd' : '');
if (!fs.existsSync(gruntPath)) {
console.error('Grunt command does not exist at: ' + gruntPath);
console.error('Run script/bootstrap to install Grunt');
process.exit(1);
}
var args = ['--gruntfile', path.resolve('build', 'Gruntfile.coffee')];
args = args.concat(additionalArgs);
cp.safeSpawn(gruntPath, args, callback);
};