diff options
Diffstat (limited to 'services/blog/nuldoc-src/main.ts')
| -rw-r--r-- | services/blog/nuldoc-src/main.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/services/blog/nuldoc-src/main.ts b/services/blog/nuldoc-src/main.ts new file mode 100644 index 00000000..af6acc2e --- /dev/null +++ b/services/blog/nuldoc-src/main.ts @@ -0,0 +1,19 @@ +import { runBuildCommand } from "./commands/build.ts"; +import { runNewCommand } from "./commands/new.ts"; +import { runServeCommand } from "./commands/serve.ts"; +import { getDefaultConfigPath, loadConfig } from "./config.ts"; + +const config = await loadConfig(getDefaultConfigPath()); + +if (import.meta.main) { + const command = Deno.args[0] ?? "build"; + if (command === "build") { + await runBuildCommand(config); + } else if (command === "new") { + runNewCommand(config); + } else if (command === "serve") { + runServeCommand(config); + } else { + console.error(`Unknown command: ${command}`); + } +} |
