scripts/build.js
function runCommand(cmd, args) {
  var prev = null;
  console.log(chalk.cyanBright(cmd) + " " + args.map(arg => {
    if (arg.startsWith("-"))
      return chalk.gray("\\") + "\n " + chalk.bold(arg);
    return arg;
  }).join(" ") + "\n");
  var proc = child_process.spawnSync(cmd, args, { stdio: "inherit" });
  if (proc.error)
    throw proc.error;
  if (proc.status !== 0)
    throw Error("exited with " + proc.status);
  return proc;
}
function runCommand(cmd, args) {
  var prev = null;
  console.log(chalk.cyanBright(cmd) + " " + args.map(arg => {
    if (arg.startsWith("-"))
      return chalk.gray("\\") + "\n " + chalk.bold(arg);
    return arg;
  }).join(" ") + "\n");
  var proc = child_process.spawnSync(cmd, args, { stdio: "inherit" });
  if (proc.error)
    throw proc.error;
  if (proc.status !== 0)
    throw Error("exited with " + proc.status);
  return proc;
}
Runs a command using the specified arguments.