mirror of
https://github.com/callumalpass/tasknotes.git
synced 2026-07-22 12:50:26 +00:00
24 lines
446 B
JavaScript
24 lines
446 B
JavaScript
import { spawnSync } from "node:child_process";
|
|
|
|
const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
|
|
const tasks = [
|
|
["run", "lint:ts"],
|
|
["run", "lint:review-types"],
|
|
["run", "lint:css"],
|
|
["run", "lint:architecture"],
|
|
];
|
|
|
|
let failed = false;
|
|
|
|
for (const args of tasks) {
|
|
const result = spawnSync(npmCommand, args, {
|
|
stdio: "inherit",
|
|
});
|
|
|
|
if (result.status !== 0) {
|
|
failed = true;
|
|
}
|
|
}
|
|
|
|
process.exit(failed ? 1 : 0);
|