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;