aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-06-18 23:44:56 +0900
committernsfisis <nsfisis@gmail.com>2023-06-18 23:44:56 +0900
commit0f0d396f961a1bdac520a56bdc53e27b70ff6e08 (patch)
tree9e10c83e16af08ef45a05401609610cceb0524f4 /nuldoc-src
parentca6f5bafe72ba2f9b8ccbd6fe055d20fe590bf26 (diff)
downloadblog.nsfisis.dev-0f0d396f961a1bdac520a56bdc53e27b70ff6e08.tar.gz
blog.nsfisis.dev-0f0d396f961a1bdac520a56bdc53e27b70ff6e08.tar.zst
blog.nsfisis.dev-0f0d396f961a1bdac520a56bdc53e27b70ff6e08.zip
fix(nuldoc): migrate from deprecated API, Deno.run(), to Deno.Command
Diffstat (limited to 'nuldoc-src')
-rw-r--r--nuldoc-src/commands/serve.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/nuldoc-src/commands/serve.ts b/nuldoc-src/commands/serve.ts
index ffb2020..aa5221d 100644
--- a/nuldoc-src/commands/serve.ts
+++ b/nuldoc-src/commands/serve.ts
@@ -9,10 +9,13 @@ export function runServeCommand(config: Config) {
serve(async (req) => {
const pathname = new URL(req.url).pathname;
if (!pathname.endsWith("css") && !pathname.endsWith("svg")) {
- const p = Deno.run({
- cmd: ["./nuldoc", "build"],
- });
- await p.status();
+ const command = new Deno.Command(
+ join(Deno.cwd(), "nuldoc"),
+ {
+ args: ["build"],
+ },
+ );
+ await command.output();
console.log("rebuild");
}
const res = await serveDir(req, {