lib/common.js
function runCmd(cmd, useCmdOutput){
        if (!useCmdOutput)
            grunt.log.writeln(cmd['grey']);

        var shell = require('shelljs'),
            result = shell.exec(cmd, {silent:!useCmdOutput});

        if (result.code === 0){
            if (!useCmdOutput)
                grunt.log.writeln(result.stdout['white']);
        }
        else {
            if (!useCmdOutput){
                grunt.log.writeln();
                grunt.log.writeln(result.stderr['yellow']);
            }
            grunt.fail.warn('"'+cmd+'" failed.');
        }
        return result;
    }
function runCmd(cmd, useCmdOutput){
        if (!useCmdOutput)
            grunt.log.writeln(cmd['grey']);

        var shell = require('shelljs'),
            result = shell.exec(cmd, {silent:!useCmdOutput});

        if (result.code === 0){
            if (!useCmdOutput)
                grunt.log.writeln(result.stdout['white']);
        }
        else {
            if (!useCmdOutput){
                grunt.log.writeln();
                grunt.log.writeln(result.stderr['yellow']);
            }
            grunt.fail.warn('"'+cmd+'" failed.');
        }
        return result;
    }
function runCmd ( cmd , useCmdOutput ) { if ( ! useCmdOutput ) grunt . log . writeln ( cmd [ 'grey' ] ) ; var shell = require ( 'shelljs' ) , result = shell . exec ( cmd , { silent : ! useCmdOutput } ) ; if ( result . code === 0 ) { if ( ! useCmdOutput ) grunt . log . writeln ( result . stdout [ 'white' ] ) ; } else { if ( ! useCmdOutput ) { grunt . log . writeln ( ) ; grunt . log . writeln ( result . stderr [ 'yellow' ] ) ; } grunt . fail . warn ( '"' + cmd + '" failed.' ) ; } return result ; }
runCmd(cmd, useCmdOutput)
useCmdOutput = true => the command output direct to std
runCmd ( cmd useCmdOutput ) useCmdOutput = true = > the command output direct to std