refactor: 优化代码
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
ccdbd8b683
commit
bdc0a62e36
@ -179,7 +179,7 @@
|
||||
if (cfile.endsWith('.js')) {
|
||||
compileJs(module, file, optional);
|
||||
} else if (cfile.endsWith('.json')) {
|
||||
compileJson(module, file, optional);
|
||||
compileJson(module, file);
|
||||
} else if (cfile.endsWith('.msm')) {
|
||||
// noinspection ExceptionCaughtLocallyJS
|
||||
throw Error("暂不支持解析 MiaoScript 模块");
|
||||
@ -227,7 +227,7 @@
|
||||
* @param optional 附加选项
|
||||
* @returns {Object}
|
||||
*/
|
||||
function compileJson(module, file, optional) {
|
||||
function compileJson(module, file) {
|
||||
module.exports = JSON.parse(base.read(file));
|
||||
module.loaded = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user