src/generators/script-base.js
function runCmd(cmd) {
  return new Promise((resolve, reject) => {
    exec(cmd, {}, function(err, stdout) {
      if(err) {
        console.error(stdout);
        return reject(err);
      }

      return resolve(stdout);
    });
  });
}
function runCmd(cmd) {
  return new Promise((resolve, reject) => {
    exec(cmd, {}, function(err, stdout) {
      if(err) {
        console.error(stdout);
        return reject(err);
      }

      return resolve(stdout);
    });
  });
}
function runCmd ( cmd ) { return new Promise ( ( resolve , reject ) => { exec ( cmd , { } , function ( err , stdout ) { if ( err ) { console . error ( stdout ) ; return reject ( err ) ; } return resolve ( stdout ) ; } ) ; } ) ; }
Run the given command in a child process
@param {string} cmd - command to run
@returns {Promise}
Run the given command in a child process