2 Star 1 Fork 1

hellovigoss / ftb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ftb.js 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
hellovigoss 提交于 2015-06-15 20:01 . file analyzer asynchronized
/**
* ftb tools main js
* @author: hellovigoss@gmail.com
* @lol~
*/
var global = require("./global.js");
var properties = require('./properties.js');
var analyzer = require('./analyzer.js');
var dir = require("./dir.js");
var template = require("./template.js");
//参数获取
var arguments = process.argv.splice(2);
if(arguments.length < 1){
console.log('Usage: node ftb.js path[ config_file_path]');
}
//读取系统全局配置文件
var globalConfig = (function(argFilePath){
if((typeof argFilePath) == "undefined"){
argFilePath = "./config.properties";
}
return properties.parseproperties(argFilePath, "UTF-8");
})(arguments[1]);
global.init(globalConfig);
//进行文件分析获取ftb定义方法
var funcArr = (function(dirPath){
//遍历文件
var fileList = (function(){
var tmpList = [];
dir.walk(dirPath, tmpList);
return tmpList;
})();
//清空输出文件内容
template.flush();
//分析ftb元素
var tmpList = [];
fileList.forEach(function(filePath){
analyzer.analysis(filePath, tmpList);
});
return tmpList;
})(arguments[0]);
1
https://gitee.com/hellovigoss/ftb.git
git@gitee.com:hellovigoss/ftb.git
hellovigoss
ftb
ftb
master

搜索帮助