function build()

in scripts/serve.js [46:62]


function build() {
  const args = process.argv.slice(2);
  return new Promise((resolve) => {
    exec(`npm run build ${args[0]}`, (error, stdout, stderr) => {
      if (error) {
        console.error(chalk.red(`Build error: ${error}`));
        // End the process
        process.exit(1);
      }
      console.log(`Build output: ${stdout}`);
      if (stderr) {
        console.error(`Build stderr: ${stderr}`);
      }
      resolve();
    });
  });
}