fineui是帆软报表和BI产品线所使用的前端框架。
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.
 
 
 

24 lines
662 B

const fs = require("fs");
const path = require("path");
const defaultConfig = {
handler: () => {},
filter: filePath => filePath.endsWith(".js"),
};
function tranvase(filePath, config) {
const { handler, filter } = Object.assign(defaultConfig, config);
if (fs.statSync(filePath).isDirectory()) {
fs.readdirSync(filePath).forEach(fileName => {
tranvase(path.resolve(filePath, fileName), config);
});
} else if (filter(filePath)) {
handler(filePath);
}
}
function getFuiExports() {}
function getFuiComponent() {}
module.exports = { tranvase, getFuiComponent, getFuiExports };