2022-10-24 14:06:36 +00:00
|
|
|
import { bundleRun } from "../plugos/bin/plugos-bundle.ts";
|
|
|
|
import { esbuild } from "../plugos/compile.ts";
|
|
|
|
|
2022-11-01 14:00:37 +00:00
|
|
|
export async function plugCompileCommand(
|
2022-10-24 14:06:36 +00:00
|
|
|
{ watch, dist, debug, info, importmap }: {
|
|
|
|
watch: boolean;
|
|
|
|
dist: string;
|
|
|
|
debug: boolean;
|
|
|
|
info: boolean;
|
|
|
|
importmap?: string;
|
|
|
|
},
|
|
|
|
...manifestPaths: string[]
|
|
|
|
) {
|
|
|
|
await bundleRun(
|
|
|
|
manifestPaths,
|
|
|
|
dist,
|
|
|
|
watch,
|
|
|
|
{
|
|
|
|
debug: debug,
|
|
|
|
info: info,
|
|
|
|
importMap: importmap
|
|
|
|
? new URL(importmap, `file://${Deno.cwd()}/`)
|
|
|
|
: undefined,
|
|
|
|
},
|
|
|
|
);
|
|
|
|
esbuild.stop();
|
|
|
|
}
|