refactor(build): 移除package.json中的version字段并调整构建顺序

移除docs和widget模块package.json中的version字段,这些版本由主项目统一管理
调整cwd-admin的构建脚本顺序,先构建admin再复制widget文件到public目录
This commit is contained in:
anghunk
2026-01-21 11:45:47 +08:00
parent 75b434ccbd
commit dd27498451
5 changed files with 18 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
import fs from "fs";
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const src = path.resolve(__dirname, "widget/dist/cwd.js");
const destDir = path.resolve(__dirname, "public");
const dest = path.resolve(destDir, "cwd.js");
if (!fs.existsSync(destDir)) {
fs.mkdirSync(destDir, { recursive: true });
}
fs.copyFileSync(src, dest);