ClosureCompiler.js
function exec(cmd, args, stdin, callback) {
            var stdout = concat();
            var stderr = concat();

            var process = child_process.spawn(cmd, args, {
                stdio: [stdin || 'ignore', 'pipe', 'pipe']
            });
            process.stdout.pipe(stdout);
            process.stderr.pipe(stderr);
            process.on('exit', function(code, signal) {
              var err;
              if (code) {
                err = new Error(code);
                err.code = code;
                err.signal = signal;
              }
              callback(err, stdout, stderr);
            });
            process.on('error', function (err) {
              callback(err, stdout, stderr);
            });
        }
function exec(cmd, args, stdin, callback) {
            var stdout = concat();
            var stderr = concat();

            var process = child_process.spawn(cmd, args, {
                stdio: [stdin || 'ignore', 'pipe', 'pipe']
            });
            process.stdout.pipe(stdout);
            process.stderr.pipe(stderr);
            process.on('exit', function(code, signal) {
              var err;
              if (code) {
                err = new Error(code);
                err.code = code;
                err.signal = signal;
              }
              callback(err, stdout, stderr);
            });
            process.on('error', function (err) {
              callback(err, stdout, stderr);
            });
        }
function exec ( cmd , args , stdin , callback ) { var stdout = concat ( ) ; var stderr = concat ( ) ; var process = child_process . spawn ( cmd , args , { stdio : [ stdin || 'ignore' , 'pipe' , 'pipe' ] } ) ; process . stdout . pipe ( stdout ) ; process . stderr . pipe ( stderr ) ; process . on ( 'exit' , function ( code , signal ) { var err ; if ( code ) { err = new Error ( code ) ; err . code = code ; err . signal = signal ; } callback ( err , stdout , stderr ) ; } ) ; process . on ( 'error' , function ( err ) { callback ( err , stdout , stderr ) ; } ) ; }
Executes a command
Executes a command