You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
465 B
17 lines
465 B
/** |
|
* 将 FineUI 模块名从 fineui 改成 @fui/core |
|
*/ |
|
const { tranvase } = require("./lib/utils"); |
|
const fs = require("fs"); |
|
|
|
const config = { |
|
handler: filePath => { |
|
let content = fs.readFileSync(filePath).toString(); |
|
content = content.replace(/(?<=from ["|'])fineui(?=["|'])/g, str => { |
|
return "@fui/core"; |
|
}); |
|
fs.writeFileSync(filePath, content); |
|
}, |
|
}; |
|
|
|
tranvase(process.argv[2], config);
|
|
|