summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/commands
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-12-04 02:32:35 +0900
committernsfisis <nsfisis@gmail.com>2024-12-04 02:32:35 +0900
commitbd753e934bb7b13fbc68c49c4694de7c4530fe49 (patch)
tree97c84d8a2a96a47a7e03eb141481baf96b310979 /vhosts/blog/nuldoc-src/commands
parent2477a4800d30d766d8dab5aa5dc4023399e28b1a (diff)
downloadnsfisis.dev-bd753e934bb7b13fbc68c49c4694de7c4530fe49.tar.gz
nsfisis.dev-bd753e934bb7b13fbc68c49c4694de7c4530fe49.tar.zst
nsfisis.dev-bd753e934bb7b13fbc68c49c4694de7c4530fe49.zip
feat(blog/nuldoc): make nuldoc not require --allow-run flag
Diffstat (limited to 'vhosts/blog/nuldoc-src/commands')
-rw-r--r--vhosts/blog/nuldoc-src/commands/serve.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/vhosts/blog/nuldoc-src/commands/serve.ts b/vhosts/blog/nuldoc-src/commands/serve.ts
index 5fe8a6f9..cc8d5d5b 100644
--- a/vhosts/blog/nuldoc-src/commands/serve.ts
+++ b/vhosts/blog/nuldoc-src/commands/serve.ts
@@ -2,19 +2,14 @@ import { serveDir } from "std/http/file_server.ts";
import { STATUS_CODE, STATUS_TEXT } from "std/http/mod.ts";
import { join } from "std/path/mod.ts";
import { Config } from "../config.ts";
+import { runBuildCommand } from "./build.ts";
export function runServeCommand(config: Config) {
const rootDir = join(Deno.cwd(), config.locations.destDir);
Deno.serve(async (req) => {
const pathname = new URL(req.url).pathname;
if (!pathname.endsWith("css") && !pathname.endsWith("svg")) {
- const command = new Deno.Command(
- join(Deno.cwd(), "nuldoc"),
- {
- args: ["build"],
- },
- );
- await command.output();
+ await runBuildCommand(config);
console.log("rebuild");
}
const res = await serveDir(req, {