aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/main.ts
blob: 8598d80c2d7b0d2a4b5c859128633a9106e19bfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { runBuildCommand } from "./commands/build.ts";
import { runNewCommand } from "./commands/new.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 === "new") {
    runNewCommand(config);
  } else if (command === "serve") {
    runServeCommand(config);
  } else {
    console.error(`Unknown command: ${command}`);
  }
}