-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.ts
More file actions
25 lines (23 loc) · 683 Bytes
/
main.ts
File metadata and controls
25 lines (23 loc) · 683 Bytes
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
import Instance from "./src/platform.ts";
import { Command } from "https://deno.land/x/cliffy@v0.25.7/command/mod.ts";
await new Command()
.name("wpack")
.version("0.1.1")
.description("Application packager dwm")
.command("compile <source:string>", "compiles a dwm application")
.option(
"-o, --output [PATH_OF_FILE:string]",
"output location of the exacutable",
)
.action(async ({ output }, source: string) => {
const instance = new Instance(source);
await instance.compile([
"--unstable",
"-Ar",
]);
await instance.windowify();
if (typeof output === "string") {
instance.rename(output);
}
})
.parse(Deno.args);