code: function npm(cwd, cmd) {
    console.log(cwd, chalk.blue('running npm', cmd));
    const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
    return spawn(npm, (cmd || 'install').split(' '), {cwd, env});
  }
docs: run npm with the given args
  @param cwd working directory
  @param cmd the command to execute as a string
  @return {*}