This commit is contained in:
parent
56f49d988d
commit
80c51bdfea
75 changed files with 383 additions and 1838 deletions
21
scripts/build-all-sites.mjs
Normal file
21
scripts/build-all-sites.mjs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { spawnSync } from "node:child_process";
|
||||
import { rmSync } from "node:fs";
|
||||
import { BLOG_SITES } from "../src/blog-sites.js";
|
||||
|
||||
rmSync("dist", { force: true, recursive: true });
|
||||
|
||||
for (const site of BLOG_SITES) {
|
||||
console.log(`\nBuilding ${site.title} -> dist/${site.key}`);
|
||||
|
||||
const result = spawnSync("npx", ["astro", "build"], {
|
||||
env: {
|
||||
...process.env,
|
||||
BLOG_SITE: site.key,
|
||||
},
|
||||
stdio: "inherit",
|
||||
});
|
||||
|
||||
if (result.status !== 0) {
|
||||
process.exit(result.status ?? 1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue