aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/main.ts
blob: 1635d76a51dc1c8286ef601fb15a4b8669c2b7d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { runBuildCommand } from "./commands/build.ts";
import { runServeCommand } from "./commands/serve.ts";
import { config } from "./config.ts";

if (import.meta.main) {
  const command = Deno.args[0] ?? "build";
  if (command === "build") {
    await runBuildCommand(config);
  } else if (command === "serve") {
    runServeCommand(config);
  } else {
    console.error(`Unknown command: ${command}`);
  }
}