/**
 * 将 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);