This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import solidPlugin from "@opentui/solid/bun-plugin";
|
||||
|
||||
export async function build() {
|
||||
const results = await Promise.all([
|
||||
Bun.build({
|
||||
entrypoints: ["src/index.ts", "src/quota-rpc.ts"],
|
||||
outdir: "dist",
|
||||
target: "bun",
|
||||
format: "esm",
|
||||
}),
|
||||
Bun.build({
|
||||
entrypoints: ["src/tui.tsx"],
|
||||
outdir: "dist",
|
||||
target: "bun",
|
||||
format: "esm",
|
||||
external: ["@opencode/plugin/tui", "@opentui/solid", "solid-js"],
|
||||
plugins: [solidPlugin],
|
||||
}),
|
||||
]);
|
||||
|
||||
for (const result of results) {
|
||||
if (result.success) continue;
|
||||
for (const log of result.logs) console.error(log);
|
||||
throw new Error("Build failed");
|
||||
}
|
||||
}
|
||||
|
||||
if (import.meta.main) await build();
|
||||
Reference in New Issue
Block a user