标签:mod tor typeof ret bsp define root 框架 his
1.原有框架的输出结构
;(function(root, factory) {
if (typeof define === ‘function‘ && define.amd) {
define(factory);
} else if (typeof exports === ‘object‘) {
module.exports = factory();
} else {
root.moduleAdd = factory();
}
})(this, function() {
var moduleAdd = {};
return moduleAdd;
});
2.整理后 可在已有项目中调用的结构
var moduleAdd = {};
module.exports = moduleAdd;
标签:mod tor typeof ret bsp define root 框架 his
原文地址:https://www.cnblogs.com/tongbiao/p/9951633.html