aoc-automation
Version:
Advent of Code tool to automate the repetitive parts of AoC.
23 lines (22 loc) • 622 B
JavaScript
import { spawnSync } from "child_process";
import path from "path";
import kleur from "kleur";
const buildDefinitions = (year) => {
console.log("\nBuilding definition files...\n");
const t0 = process.hrtime.bigint();
spawnSync(
"tsc",
["--emitDeclarationOnly", "--outDir", path.join(year, "dist")],
{
stdio: "inherit",
shell: true
}
);
const t1 = process.hrtime.bigint();
const time = (Number(t1 - t0) / 1e6).toFixed(0);
console.log("\u26A1", kleur.green(`Done in ${time}ms`));
};
var buildDefinitions_default = buildDefinitions;
export {
buildDefinitions_default as default
};