1const cp = require("child_process"); 2const path = require("path"); 3const chalk = require("chalk"); 4 5const argv = process.argv.slice(2); 6 7// --tasks-simple is used by VS Code to infer a task list; try and keep that working. 8if (!argv.includes("--tasks-simple")) { 9 console.error(chalk.yellowBright("Warning: using gulp shim; please consider running hereby directly.")); 10} 11 12const args = [ 13 ...process.execArgv, 14 path.join(__dirname, "node_modules", "hereby", "bin", "hereby.js"), 15 ...argv, 16]; 17 18const { status } = cp.spawnSync(process.execPath, args, { stdio: "inherit" }); 19process.exit(status ?? 1); 20