diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-06-18 23:44:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-06-18 23:44:56 +0900 |
| commit | 0f0d396f961a1bdac520a56bdc53e27b70ff6e08 (patch) | |
| tree | 9e10c83e16af08ef45a05401609610cceb0524f4 | |
| parent | ca6f5bafe72ba2f9b8ccbd6fe055d20fe590bf26 (diff) | |
| download | blog.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
| -rw-r--r-- | nuldoc-src/commands/serve.ts | 11 |
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, { |
