refactor(build): 移除package.json中的version字段并调整构建顺序
移除docs和widget模块package.json中的version字段,这些版本由主项目统一管理 调整cwd-admin的构建脚本顺序,先构建admin再复制widget文件到public目录
This commit is contained in:
16
cwd-admin/copy-cwd-to-public.js
Normal file
16
cwd-admin/copy-cwd-to-public.js
Normal 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);
|
||||
Reference in New Issue
Block a user