Move plugos-bundle into silverbullet plug:build command

This commit is contained in:
Zef Hemel
2022-10-24 16:06:36 +02:00
parent 01aea4768b
commit ae0aa0639c
6 changed files with 62 additions and 8 deletions
+27
View File
@@ -0,0 +1,27 @@
import { bundleRun } from "../plugos/bin/plugos-bundle.ts";
import { esbuild } from "../plugos/compile.ts";
export async function plugBundleCommand(
{ 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();
}