diff --git a/packages/el-bot/package.json b/packages/el-bot/package.json index c9c648a..2b43a12 100644 --- a/packages/el-bot/package.json +++ b/packages/el-bot/package.json @@ -52,12 +52,8 @@ "folder": "mcl" }, "scripts": { - "build": "tsup && npm run copy:pkg", "build:api": "npx typedoc", - "copy:pkg": "tsx scripts/copy.ts", - "dev": "npm run watch", - "watch": "tsup --watch", - "prepublishOnly": "npm run build" + "dev": "npm run watch" }, "dependencies": { "@koa/cors": "^5.0.0", diff --git a/packages/el-bot/scripts/copy.ts b/packages/el-bot/scripts/copy.ts deleted file mode 100644 index be8d268..0000000 --- a/packages/el-bot/scripts/copy.ts +++ /dev/null @@ -1,22 +0,0 @@ -import path, { dirname } from 'node:path' -import { fileURLToPath } from 'node:url' -import fs from 'fs-extra' - -import { getAllPlugins } from './utils' - -const plugins = getAllPlugins() - -const __dirname = dirname(fileURLToPath(import.meta.url)) - -export async function copy() { - for (const item of plugins) { - const source = path.resolve(__dirname, '../src/plugins/', item, 'index.ts') - const pluginDestDir = path.resolve(__dirname, '../dist/plugins', item) - - await fs.ensureDir(pluginDestDir) - const dest = path.resolve(pluginDestDir, 'index.ts') - fs.copyFileSync(source, dest) - } -} - -copy() diff --git a/packages/el-bot/tsup.config.ts b/packages/el-bot/tsup.config.ts deleted file mode 100644 index 834b711..0000000 --- a/packages/el-bot/tsup.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { defineConfig } from 'tsup' - -export default defineConfig((options) => { - return { - entry: [ - 'src/index.ts', - 'src/cli/index.ts', - 'src/bot/plugins.ts', - ], - clean: true, - dts: true, - minify: !options.watch, - format: ['esm', 'cjs'], - } -})