mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-06-22 01:50:24 +08:00
升级Vue3,iView替换ElementPlus
- 删除babel配置、更新依赖与入口初始化 - 全量替换UI组件、样式适配,新增迁移文档与标签/过滤器自动化替换脚本
This commit is contained in:
21
im/scripts/fix-deep.js
Normal file
21
im/scripts/fix-deep.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
function walk(dir, files = []) {
|
||||
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
const full = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) walk(full, files);
|
||||
else if (/\.(vue|less)$/.test(entry.name)) files.push(full);
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
const root = path.join(__dirname, "../src");
|
||||
for (const file of walk(root)) {
|
||||
let content = fs.readFileSync(file, "utf8");
|
||||
const next = content.replace(/\/deep\/\s*([^\{]+)\{/g, ":deep($1) {");
|
||||
if (next !== content) {
|
||||
fs.writeFileSync(file, next);
|
||||
console.log("fixed:", file);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user