mirror of
https://github.com/atom/atom.git
synced 2026-01-20 20:38:09 -05:00
18 lines
620 B
JavaScript
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);
|
|
};
|