diff options
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}`); + } } |
