dev.ts: clear console

This commit is contained in:
Theis Pieter Hollebeek 2025-10-15 12:37:55 +02:00
parent 89756c2a5e
commit 275aaed941

12
dev.ts
View File

@ -16,10 +16,9 @@ async function buildDocs() {
args: ["task", "build"],
cwd: "docs",
}).output();
console.log("Done!");
}
async function watchAndBuildDocs() {
async function watchAndBuildDocs(addr: Addr) {
let changeOccurred = true;
let running = false;
setInterval(async () => {
@ -27,7 +26,9 @@ async function watchAndBuildDocs() {
return;
}
running = true;
console.clear();
await buildDocs();
alertListening(addr);
changeOccurred = false;
running = false;
}, 250);
@ -51,9 +52,10 @@ function serveDist(addr: Addr) {
}
if (import.meta.main) {
watchAndBuildDocs();
serveDist({
const addr = {
hostname: "0.0.0.0",
port: 8180,
});
};
watchAndBuildDocs(addr);
serveDist(addr);
}