From 275aaed941844a9345f21a2b48186c9ae80fc619 Mon Sep 17 00:00:00 2001 From: Theis Pieter Hollebeek Date: Wed, 15 Oct 2025 12:37:55 +0200 Subject: [PATCH] dev.ts: clear console --- dev.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dev.ts b/dev.ts index c962fd9..bff1a72 100644 --- a/dev.ts +++ b/dev.ts @@ -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); }