19 lines
499 B
TypeScript
19 lines
499 B
TypeScript
import { resolvePath } from '@kevisual/use-config';
|
|
import { execSync } from 'node:child_process';
|
|
|
|
const entry = 'agent/opencode.ts';
|
|
const naming = 'opencode';
|
|
const external: string[] = ["bun"];
|
|
await Bun.build({
|
|
target: 'node',
|
|
format: 'esm',
|
|
entrypoints: [resolvePath(entry, { meta: import.meta })],
|
|
outdir: resolvePath('./dist', { meta: import.meta }),
|
|
naming: {
|
|
entry: `${naming}.js`,
|
|
},
|
|
external,
|
|
});
|
|
|
|
const cmd = 'dts -i agent/opencode.ts -o opencode.d.ts';
|
|
execSync(cmd); |