diff options
author | Alan Pearce | 2024-04-17 20:28:04 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-17 20:53:45 +0200 |
commit | 30fed9da228ef9bab5734e000e598ff380cb55f5 (patch) | |
tree | cfc89a40a12dcc572c0a457b62bdde129690e482 /bin | |
parent | 1e05c18ed8e44078e3e102ff5bb8af6e25717fc9 (diff) | |
download | website-30fed9da228ef9bab5734e000e598ff380cb55f5.tar.lz website-30fed9da228ef9bab5734e000e598ff380cb55f5.tar.zst website-30fed9da228ef9bab5734e000e598ff380cb55f5.zip |
bye bye bun
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build.ts | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/bin/build.ts b/bin/build.ts deleted file mode 100755 index 69cfd6c..0000000 --- a/bin/build.ts +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bun -import fs from "node:fs"; -import log from "loglevel"; - -import generateSite from "../src/templates"; - -log.setLevel((import.meta.env["LOG_LEVEL"] || "info") as log.LogLevelDesc); - -fs.mkdirSync("public", { recursive: true }); -log.info("Generating site..."); -try { - await generateSite(); -} catch (error) { - log.error("Error generating site", error); - process.exit(1); -} - -log.info("Copying static files..."); -if (!fs.existsSync("static")) { - log.error("static directory not found"); - process.exit(1); -} -fs.readdirSync("static").map((file) => { - log.debug(`Copying static/${file}`); - fs.cpSync(`static/${file}`, `public/${file}`, { - dereference: true, - recursive: true, - preserveTimestamps: true, - }); -}); |