mirror of
https://github.com/xuxiaobo-bobo/boda_jsEnv.git
synced 2025-04-23 06:49:27 +08:00
28 lines
581 B
JavaScript
28 lines
581 B
JavaScript
const fs=require("fs");
|
|
const path = require("path");
|
|
|
|
|
|
function getFile(name) {
|
|
let tools_path = path.resolve(__dirname, '../tools/');
|
|
try {
|
|
return fs.readFileSync(`${tools_path}/${name}.js`) + "\r\n";
|
|
|
|
} catch (e) {
|
|
console.log(`${tools_path}/${name}.js不存在`)
|
|
return "";
|
|
}
|
|
}
|
|
|
|
function getCode(){
|
|
|
|
let code=""
|
|
code+=getFile("toolsFunc")
|
|
// code+=getFile("toolsJsSoup")
|
|
code+=getFile("toolsParseHtml")
|
|
code+=getFile("envFunc")
|
|
code+=getFile("toolsPlugin")
|
|
return code
|
|
}
|
|
module.exports={
|
|
getCode,getFile
|
|
} |