2024-04-30 19:09:12 +00:00
|
|
|
/** @type {(parser: string, ps: string[]) => import("bun").Subprocess} */
|
|
|
|
const prettier = (parser, ps) =>
|
2024-05-03 15:41:33 +00:00
|
|
|
Bun.spawn(["bun", "x", "prettier", "--write", "--parser", parser, ...ps], {
|
|
|
|
stdout: "inherit",
|
|
|
|
stderr: "inherit",
|
|
|
|
});
|
2024-04-30 19:09:12 +00:00
|
|
|
|
|
|
|
const procs = [
|
2024-05-03 15:41:33 +00:00
|
|
|
prettier("babel", ["./src/**/*.js", "./bun/**/*.js", "./.prettierrc.cjs"]),
|
|
|
|
prettier("json", ["./package.json", "./jsconfig.json"]),
|
2024-04-30 19:09:12 +00:00
|
|
|
Bun.spawn(
|
|
|
|
[
|
2024-05-03 15:41:33 +00:00
|
|
|
"bun",
|
|
|
|
"x",
|
|
|
|
"purs-tidy",
|
|
|
|
"format-in-place",
|
|
|
|
"src/**/*.purs",
|
|
|
|
"test/**/*.purs",
|
2024-04-30 19:09:12 +00:00
|
|
|
],
|
|
|
|
{
|
2024-05-03 15:41:33 +00:00
|
|
|
stdout: "inherit",
|
|
|
|
stderr: "inherit",
|
2024-04-30 19:09:12 +00:00
|
|
|
},
|
|
|
|
),
|
2024-05-03 15:41:33 +00:00
|
|
|
];
|
2024-04-30 19:09:12 +00:00
|
|
|
|
2024-05-03 15:41:33 +00:00
|
|
|
await Promise.all(procs.map((p) => p.exited));
|