aboutsummaryrefslogtreecommitdiff
path: root/deno/service-manager/main.ts
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-06-13 13:55:05 +0800
committerYuqian Yang <crupest@crupest.life>2025-06-13 13:56:35 +0800
commit7b09e420ede2f9c92f5eaff28508ec10255414b7 (patch)
treefd78a3929b384dc5763e52247c26fab6803a6710 /deno/service-manager/main.ts
parent01e4d2464bf1083361d9d7b6e7018cd7a52ea2df (diff)
downloadcrupest-7b09e420ede2f9c92f5eaff28508ec10255414b7.tar.gz
crupest-7b09e420ede2f9c92f5eaff28508ec10255414b7.tar.bz2
crupest-7b09e420ede2f9c92f5eaff28508ec10255414b7.zip
deno: move service manager to tools.
Diffstat (limited to 'deno/service-manager/main.ts')
-rw-r--r--deno/service-manager/main.ts39
1 files changed, 0 insertions, 39 deletions
diff --git a/deno/service-manager/main.ts b/deno/service-manager/main.ts
deleted file mode 100644
index 93f4c1b..0000000
--- a/deno/service-manager/main.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { parseArgs } from "@std/cli";
-import { loadVariables, TemplateDir } from "./template.ts";
-import { join } from "@std/path";
-
-if (import.meta.main) {
- const args = parseArgs(Deno.args, {
- string: ["project-dir"],
- boolean: ["no-dry-run"],
- });
-
- if (args._.length === 0) {
- throw new Error("You must specify a command.");
- }
-
- const projectDir = args["project-dir"];
- if (projectDir == null) {
- throw new Error("You must specify project-dir.");
- }
-
- const command = String(args._[0]);
-
- switch (command) {
- case "gen-tmpl":
- new TemplateDir(
- join(projectDir, "services/templates"),
- ).generateWithVariableFiles(
- [
- join(projectDir, "data/config"),
- join(projectDir, "services/config.template"),
- ],
- args["no-dry-run"] === true
- ? join(projectDir, "services/generated")
- : undefined,
- );
- break;
- default:
- throw new Error(command + " is not a valid command.");
- }
-}