-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.ts
29 lines (28 loc) · 906 Bytes
/
mod.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
import { Command } from "./deps.ts";
import { compile } from "./compile.ts";
const args = Deno.args.join(" ");
if (args.includes("--help") || args.includes("-h")) {
await new Command()
.name("deutron")
.description(
"Utility script that compiles a deno program to a binary that also includes webview. Takes all default Deno compile arguments as well."
)
.option(
"--webview-url <string>",
"The URL or path of the html file to load.",
{
default: "./index.html",
}
)
.option("--title <string>", "The title of the webview")
.option(
"--no-decorations",
"Disables the OS title bar (minimize, maximize, close, etc)"
)
.option("--transparent", "Allows for transparent backgrounds")
.option("--dev-tools", "Allows user to open the dev-tools window")
.arguments("[file]")
.parse();
} else {
await compile();
}