mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 09:24:19 -06:00
This eliminates a significant number of dependencies, eliminating all npm audit issues, speeding up `npm ci` by 20%, and overall making the build faster (faster startup, direct code is faster than streams, etc) and clearer to understand. I'm finding it much easier to make build changes for the module transform with this; I can more clearly indicate task dependencies and prevent running tasks that don't need to be run. Given we're changing our build process entirely (new deps, new steps), it seems like this is a good time to change things up.
20 lines
629 B
TypeScript
20 lines
629 B
TypeScript
const cp = require("child_process");
|
|
const path = require("path");
|
|
const chalk = require("chalk");
|
|
|
|
const argv = process.argv.slice(2);
|
|
|
|
// --tasks-simple is used by VS Code to infer a task list; try and keep that working.
|
|
if (!argv.includes("--tasks-simple")) {
|
|
console.error(chalk.yellowBright("Warning: using gulp shim; please consider running hereby directly."));
|
|
}
|
|
|
|
const args = [
|
|
...process.execArgv,
|
|
path.join(__dirname, "node_modules", "hereby", "bin", "hereby.js"),
|
|
...argv,
|
|
];
|
|
|
|
const { status } = cp.spawnSync(process.execPath, args, { stdio: "inherit" });
|
|
process.exit(status ?? 1);
|