summaryrefslogtreecommitdiffhomepage
path: root/services/blog/nuldoc-src/main.ts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-06-27 23:39:31 +0900
committernsfisis <nsfisis@gmail.com>2025-06-27 23:39:31 +0900
commit674fe965550444db87edc7937ff6932e1a918d9d (patch)
treee8a80dd958d3e082485286bf5785a7992b6e6b0e /services/blog/nuldoc-src/main.ts
parentfe4d1d625b53796c5f20399790e5ff8c7a7e1608 (diff)
downloadnsfisis.dev-674fe965550444db87edc7937ff6932e1a918d9d.tar.gz
nsfisis.dev-674fe965550444db87edc7937ff6932e1a918d9d.tar.zst
nsfisis.dev-674fe965550444db87edc7937ff6932e1a918d9d.zip
feat(meta): rename vhosts/ directory to services/
Diffstat (limited to 'services/blog/nuldoc-src/main.ts')
-rw-r--r--services/blog/nuldoc-src/main.ts19
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}`);
+ }
+}