fineui是帆软报表和BI产品线所使用的前端框架。
 
 
 

23 lines
708 B

const { tranvase } = require("./lib/utils");
const fs = require("fs");
const config = {
handler: filePath => {
if (filePath.includes("test") || filePath.includes("dist")) {
return;
}
let content = fs.readFileSync(filePath).toString();
let reg = /(['"`])(.*?)\1/g;
if (reg.test(content)) {
Array.from(content.matchAll(reg))
.map(el => el[2])
.forEach(el => {
if (Array.from(el).some(el => el.charCodeAt(0) > 255)) {
console.log(filePath, el);
}
});
}
},
};
tranvase(process.argv[2], config);