feat: 重构代码结构,更新插件导出,添加构建配置和npm配置文件
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user