Fix plug:compile flags
This commit is contained in:
parent
5d9329a531
commit
01ea4c9f15
@ -1,7 +1,7 @@
|
|||||||
import { bundleRun } from "../plugos/bin/plugos-bundle.ts";
|
import { bundleRun } from "../plugos/bin/plugos-bundle.ts";
|
||||||
import { esbuild } from "../plugos/compile.ts";
|
import { esbuild } from "../plugos/compile.ts";
|
||||||
|
|
||||||
export async function plugBundleCommand(
|
export async function plugCompileCommand(
|
||||||
{ watch, dist, debug, info, importmap }: {
|
{ watch, dist, debug, info, importmap }: {
|
||||||
watch: boolean;
|
watch: boolean;
|
||||||
dist: string;
|
dist: string;
|
||||||
@ -11,6 +11,7 @@ export async function plugBundleCommand(
|
|||||||
},
|
},
|
||||||
...manifestPaths: string[]
|
...manifestPaths: string[]
|
||||||
) {
|
) {
|
||||||
|
console.log("All optiosn", arguments);
|
||||||
await bundleRun(
|
await bundleRun(
|
||||||
manifestPaths,
|
manifestPaths,
|
||||||
dist,
|
dist,
|
@ -6,7 +6,7 @@ import { upgradeCommand } from "./cmd/upgrade.ts";
|
|||||||
import { versionCommand } from "./cmd/version.ts";
|
import { versionCommand } from "./cmd/version.ts";
|
||||||
import { fixCommand } from "./cmd/fix.ts";
|
import { fixCommand } from "./cmd/fix.ts";
|
||||||
import { serveCommand } from "./cmd/server.ts";
|
import { serveCommand } from "./cmd/server.ts";
|
||||||
import { plugBundleCommand } from "./cmd/plug_bundle.ts";
|
import { plugCompileCommand } from "./cmd/plug_compile.ts";
|
||||||
|
|
||||||
await new Command()
|
await new Command()
|
||||||
.name("silverbullet")
|
.name("silverbullet")
|
||||||
@ -25,11 +25,13 @@ await new Command()
|
|||||||
.command("fix", "Fix a broken space")
|
.command("fix", "Fix a broken space")
|
||||||
.arguments("<folder:string>")
|
.arguments("<folder:string>")
|
||||||
.action(fixCommand)
|
.action(fixCommand)
|
||||||
// plug:bundle
|
// plug:compile
|
||||||
.command("plug:compile", "Bundle (compile) one or more plug manifests")
|
.command("plug:compile", "Bundle (compile) one or more plug manifests")
|
||||||
.arguments("<...name.plug.yaml:string>")
|
.arguments("<...name.plug.yaml:string>")
|
||||||
.option("--debug", "Do not minifiy code", { default: false })
|
.option("--debug [type:boolean]", "Do not minifiy code", { default: false })
|
||||||
.option("--info", "Print out size info per function", { default: false })
|
.option("--info [type:boolean]", "Print out size info per function", {
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
.option("--watch, -w [type:boolean]", "Watch for changes and rebuild", {
|
.option("--watch, -w [type:boolean]", "Watch for changes and rebuild", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
@ -39,7 +41,7 @@ await new Command()
|
|||||||
{ default: "." },
|
{ default: "." },
|
||||||
)
|
)
|
||||||
.option("--importmap <path:string>", "Path to import map file to use")
|
.option("--importmap <path:string>", "Path to import map file to use")
|
||||||
.action(plugBundleCommand)
|
.action(plugCompileCommand)
|
||||||
// upgrade
|
// upgrade
|
||||||
.command("upgrade", "Upgrade Silver Bullet")
|
.command("upgrade", "Upgrade Silver Bullet")
|
||||||
.action(upgradeCommand)
|
.action(upgradeCommand)
|
||||||
|
Loading…
Reference in New Issue
Block a user