diff options
| -rwxr-xr-x | vhosts/blog/nuldoc | 1 | ||||
| -rw-r--r-- | vhosts/blog/nuldoc-src/commands/serve.ts | 9 |
2 files changed, 2 insertions, 8 deletions
diff --git a/vhosts/blog/nuldoc b/vhosts/blog/nuldoc index 7fc7cf22..8ab893d3 100755 --- a/vhosts/blog/nuldoc +++ b/vhosts/blog/nuldoc @@ -6,6 +6,5 @@ deno run \ --allow-read="$base_dir" \ --allow-write="$base_dir" \ --allow-net="0.0.0.0:8000" \ - --allow-run="./nuldoc" \ "$base_dir/nuldoc-src/main.ts" \ "$@" 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, { |
