src/utils.js
async function execTasks(tasks, taskType) {
  debug(`execTasks: called for ${taskType}`);
  if (!(_.isEmpty(tasks))) {
    if (taskType) console.log(`running ${taskType}...`);
    const output = await Promise.mapSeries(tasks, async(task) => {
      const result = await execTask(task);
      if (_.isString(result.stdout) && (!_.isEmpty(result.stdout)))
        console.log(result.stdout.trim());
      if (_.isString(result.stderr) && (!_.isEmpty(result.stderr)))
        console.log(result.stderr.trim());
      return result;
    });
    return output;
  }
  debug("execTasks: nothing to do; resolving");
  return;
}
async function execTasks(tasks, taskType) {
  debug(`execTasks: called for ${taskType}`);
  if (!(_.isEmpty(tasks))) {
    if (taskType) console.log(`running ${taskType}...`);
    const output = await Promise.mapSeries(tasks, async(task) => {
      const result = await execTask(task);
      if (_.isString(result.stdout) && (!_.isEmpty(result.stdout)))
        console.log(result.stdout.trim());
      if (_.isString(result.stderr) && (!_.isEmpty(result.stderr)))
        console.log(result.stderr.trim());
      return result;
    });
    return output;
  }
  debug("execTasks: nothing to do; resolving");
  return;
}
async function execTasks ( tasks , taskType ) { debug ( ` ${ taskType } ` ) ; if ( ! ( _ . isEmpty ( tasks ) ) ) { if ( taskType ) console . log ( ` ${ taskType } ` ) ; const output = await Promise . mapSeries ( tasks , async ( task ) => { const result = await execTask ( task ) ; if ( _ . isString ( result . stdout ) && ( ! _ . isEmpty ( result . stdout ) ) ) console . log ( result . stdout . trim ( ) ) ; if ( _ . isString ( result . stderr ) && ( ! _ . isEmpty ( result . stderr ) ) ) console . log ( result . stderr . trim ( ) ) ; return result ; } ) ; return output ; } debug ( "execTasks: nothing to do; resolving" ) ; return ; }
exec list of tasks, print stdout and stderr for each
exec list of tasks print stdout and stderr for each