迁移工具
为了方便老项目迁移,fep 提供了一个迁移工具 — fep-migrator
项目基于 AST 代码解析,遍历指定目录的文件,将其中的 element-plus 组件替换为 fep 组件
使用
在项目根目录执行命令
shell
npx fep-migrator选项
--pkg-manager或-p指定包管理器,默认值为pnpm--exclude或-e排除指定目录使用glob语法,支持设置多个目录,例如:
shellfep-migrator --exclude "**/public" --exclude "**/assets"--dry-run或-d模拟运行,不实际修改文件
注意事项
使用前请备份好文件,确保文件已经提交到git仓库
fep-migrator 会迁移两个包的内容:
element-plus => @falconix/fep
@element-plus/icons-vue => @falconix/icons-vue
fep-migrator 会检测文件中是否含有 font-family: 如果有,会提示用户修改
fep-migrator 会检测文件中是否含有 .el-message-box 如果有,会提示用户修改
