-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboost.ts
67 lines (61 loc) · 1.53 KB
/
boost.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { selectScript } from "./selector.ts";
import { Command } from "https://deno.land/x/[email protected]/command/mod.ts";
import { execDeno, exit } from "./utils.ts";
import { addTask } from "./cmds/add.ts";
const get = new Command()
.arguments("<string>")
.description("🚧 [WIP] Get tasks on internet☁")
.action(
() => {
console.log(
"I'm sorry. This command is currently under development...🚧",
);
exit();
},
);
const edit = new Command()
.arguments(
"<string>",
)
.description("🚧 [WIP] Edit your tasks✏")
.action(() => {
console.log(
"I'm sorry. This command is currently under development...🚧",
);
exit();
});
const add = new Command()
.arguments("<string>")
.description("🚧 [WIP] Add your task⚡")
.action(async () => {
await addTask();
exit();
exit();
});
const net = new Command()
.arguments("<string>")
.description("Run remote task🌐")
.arguments("<url:string>")
.action(async (opts: Record<string, string>, url: string) => {
console.log(opts, url);
import.meta.url = Deno.cwd();
await execDeno(url);
exit();
});
new Command()
.name("boost")
.description("Boost your project fledgling💨")
.version("0.0.1")
.command("get", get)
.command("edit ", edit)
.command("add", add)
.command("net", net)
.parse();
const path = await selectScript();
if (typeof path == "undefined") {
console.log("🚨 An error has occurred");
exit();
} else {
import.meta.url = Deno.cwd();
await execDeno(path);
}