1
0
silverbullet/build_mobile.ts
Zef Hemel 0365673c41
Mobile app PoC (#281)
Initial checkin of mobile "native" app
2023-01-08 12:24:12 +01:00

21 lines
533 B
TypeScript

import { bundle, esbuild } from "./build.ts";
import * as flags from "https://deno.land/std@0.165.0/flags/mod.ts";
import { copy } from "https://deno.land/std@0.165.0/fs/copy.ts";
if (import.meta.main) {
const args = flags.parse(Deno.args, {
boolean: ["watch"],
alias: { w: "watch" },
default: {
watch: false,
},
});
await bundle(args.watch, "mobile", "mobile/dist");
await copy("mobile/index.html", `mobile/dist/index.html`, {
overwrite: true,
});
if (!args.watch) {
esbuild.stop();
}
}