feat: 重构代码结构,更新插件导出,添加构建配置和npm配置文件

This commit is contained in:
xiongxiao
2026-01-27 04:12:07 +08:00
parent 50332fe2f4
commit b15b11fa02
6 changed files with 34 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
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);