rs-reverse/utils/initGv.js

13 lines
462 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const paths = require('@utils/paths');
const fs = require('fs');
const { init } = require('@src/handler/parser/');
const pkg = require(paths.package);
module.exports = (function() {
const filename = pkg.tsfile;
console.log(`初始化GlobalVarible变量配置文件${filename}`)
const tsFullPath = paths.exampleResolve('codes', filename);
init(JSON.parse(fs.readFileSync(tsFullPath, 'utf8')));
return require('@src/handler/globalVarible');
})();