diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-17 02:10:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-17 02:12:11 +0900 |
| commit | 29bcdc6c1bad2240d404de9dca2463e46fdc1e93 (patch) | |
| tree | 505e3004281013531a99327c83044852f20775fb /nuldoc-src/main.ts | |
| parent | cbfb56927c34a8d45c789fe463ab1b66b8d9d9ff (diff) | |
| download | blog.nsfisis.dev-29bcdc6c1bad2240d404de9dca2463e46fdc1e93.tar.gz blog.nsfisis.dev-29bcdc6c1bad2240d404de9dca2463e46fdc1e93.tar.zst blog.nsfisis.dev-29bcdc6c1bad2240d404de9dca2463e46fdc1e93.zip | |
refactor: split command.ts
Diffstat (limited to 'nuldoc-src/main.ts')
| -rw-r--r-- | nuldoc-src/main.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nuldoc-src/main.ts b/nuldoc-src/main.ts index c7c175b..1635d76 100644 --- a/nuldoc-src/main.ts +++ b/nuldoc-src/main.ts @@ -1,6 +1,14 @@ +import { runBuildCommand } from "./commands/build.ts"; +import { runServeCommand } from "./commands/serve.ts"; import { config } from "./config.ts"; -import { run } from "./command.ts"; if (import.meta.main) { - await run(Deno.args[0] ?? "build", config); + const command = Deno.args[0] ?? "build"; + if (command === "build") { + await runBuildCommand(config); + } else if (command === "serve") { + runServeCommand(config); + } else { + console.error(`Unknown command: ${command}`); + } } |
