__quick_compile__.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. (function () {
  2. var scripts = [{"deps":{"./assets/script/mk/utils/encrypt/hmacSha256":2,"./assets/script/game/component/tween/ClickMoveBy":3,"./assets/script/mk/data/Data":5,"./assets/script/game/data/module/TurnableData":7,"./assets/script/mk/system/DataSystem":8,"./assets/script/game/module/module/turntable/Turnable":10,"./assets/script/game/manager/AudioManager":11,"./assets/script/game/module/game/FunBtns":12,"./assets/script/game/module/module/sign/Sign":13,"./assets/script/game/module/module/pigBank/PigBank":14,"./assets/script/game/module/module/help/Help":15,"./assets/script/mk/sdk/ad/toppon/zgSingleton":16,"./assets/script/mk/system/AudioSystem":17,"./assets/script/mk/MKSwitch":18,"./assets/script/mk/system/EventSystem":19,"./assets/script/mk/system/GuideSystem":20,"./assets/script/mk/system/JsbSystem":21,"./assets/script/mk/system/HttpSystem":24,"./assets/script/mk/system/UISystem":25,"./assets/script/mk/system/TimerSystem":26,"./assets/script/mk/system/AdSystem":27,"./assets/script/mk/utils/LoadResUtil":28,"./assets/script/mk/utils/GameUtil":29,"./assets/script/mk/utils/StringUtil":30,"./assets/script/mk/utils/StorageUtil":31,"./assets/script/mk/utils/LogUtil":32,"./assets/script/mk/utils/TimeUtil":33,"./assets/script/game/component/PageView":34,"./assets/script/mk/utils/MathUtil":35,"./assets/script/mk/utils/FileUtil":36,"./assets/script/mk/sdk/BuglySDK":37,"./assets/script/mk/utils/encrypt/aes":38,"./assets/script/mk/utils/encrypt/base64":39,"./assets/script/mk/utils/encrypt/sha1":40,"./assets/script/game/component/SetGray":41,"./assets/script/mk/utils/encrypt/md5":42,"./assets/script/game/component/TableView":43,"./assets/script/game/component/TabSwitching":45,"./assets/script/game/component/UIBG":46,"./assets/script/game/component/TouchHelper":47,"./assets/script/game/component/BtnClosePanel":48,"./assets/script/game/component/tween/RopeSwung":49,"./assets/script/game/component/tween/FrameAnimation":50,"./assets/script/game/component/tween/TweenEasing":51,"./assets/script/game/component/tween/ZPathFalling":52,"./assets/script/game/data/AppData":54,"./assets/script/game/data/GameData":55,"./assets/script/game/data/StorageData":56,"./assets/script/game/component/tween/RotateAround":57,"./assets/script/game/component/tween/UIOpenAndClose":58,"./assets/script/game/data/HttpData":59,"./assets/script/game/component/tween/FlyNode":60,"./assets/script/game/data/module/PigBankData":61,"./assets/script/game/data/AdData":63,"./assets/script/game/data/WechatData":64,"./assets/script/game/data/module/HelpData":65,"./assets/script/game/data/module/SignData":68,"./assets/script/game/component/Button":69,"./assets/script/game/module/module/turntable/TurnableItem":70,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidInterstitialJS":71,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidNativeJS":85,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidBannerJS":87,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSInterstitialJS":88,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidJS":89,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSNativeJS":90,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSJS":91,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidRewardedVideoJS":92,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSRewardedVideoJS":93,"./assets/script/Main":1,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSBannerJS":6,"./assets/script/game/module/module/login/Login":4,"./assets/script/mk/utils/EncryptUtil":23,"./assets/script/mk/system/MKSystem":22,"./assets/script/game/component/BtnOpenPanel":44,"./assets/script/game/data/LoginData":53,"./assets/script/game/data/g":67,"./assets/script/game/component/tween/UITween":62,"./assets/script/game/module/game/Game":66,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATNative":72,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATSDKMgr":73,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATInterstitial":75,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideo":77,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATInterstitialJSSDK":78,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATRewardedVideoJSSDK":81,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATJSSDK":82,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATNativeJSSDK":83,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATBanner":84,"./assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATBannerJSSDK":86,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATBannerJS":9,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATNativeJS":74,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATInterstitialJS":76,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATSDKMgrJS":79,"./assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideoJS":80},"path":"preview-scripts/__qc_index__.js"},{"deps":{"./mk/system/UISystem":25},"path":"preview-scripts/assets/script/Main.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/encrypt/hmacSha256.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/tween/ClickMoveBy.js"},{"deps":{"../../../../mk/system/UISystem":25},"path":"preview-scripts/assets/script/game/module/module/login/Login.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/data/Data.js"},{"deps":{"ATiOSJS":91},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSBannerJS.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/module/TurnableData.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/DataSystem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATBannerJS.js"},{"deps":{},"path":"preview-scripts/assets/script/game/module/module/turntable/Turnable.js"},{"deps":{},"path":"preview-scripts/assets/script/game/manager/AudioManager.js"},{"deps":{},"path":"preview-scripts/assets/script/game/module/game/FunBtns.js"},{"deps":{},"path":"preview-scripts/assets/script/game/module/module/sign/Sign.js"},{"deps":{},"path":"preview-scripts/assets/script/game/module/module/pigBank/PigBank.js"},{"deps":{},"path":"preview-scripts/assets/script/game/module/module/help/Help.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/zgSingleton.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/AudioSystem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/MKSwitch.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/EventSystem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/GuideSystem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/JsbSystem.js"},{"deps":{"../sdk/BuglySDK":37,"./AudioSystem":17,"../utils/TimeUtil":33,"../utils/FileUtil":36,"./HttpSystem":24,"./DataSystem":8,"../utils/LoadResUtil":28,"../utils/LogUtil":32,"../utils/EncryptUtil":23,"../utils/GameUtil":29,"../utils/StorageUtil":31,"./EventSystem":19,"./TimerSystem":26,"../utils/MathUtil":35,"./AdSystem":27,"../sdk/ad/toppon/AnyThinkAdsMgr/ATSDKMgr":73,"./JsbSystem":21},"path":"preview-scripts/assets/script/mk/system/MKSystem.js"},{"deps":{"./encrypt/aes.js":38,"./encrypt/hmacSha256":2},"path":"preview-scripts/assets/script/mk/utils/EncryptUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/HttpSystem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/UISystem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/TimerSystem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/system/AdSystem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/LoadResUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/GameUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/StringUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/StorageUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/LogUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/TimeUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/PageView.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/MathUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/FileUtil.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/BuglySDK.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/encrypt/aes.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/encrypt/base64.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/encrypt/sha1.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/SetGray.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/utils/encrypt/md5.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/TableView.js"},{"deps":{"../../mk/system/UISystem":25},"path":"preview-scripts/assets/script/game/component/BtnOpenPanel.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/TabSwitching.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/UIBG.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/TouchHelper.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/BtnClosePanel.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/tween/RopeSwung.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/tween/FrameAnimation.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/tween/TweenEasing.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/tween/ZPathFalling.js"},{"deps":{"./StorageData":56},"path":"preview-scripts/assets/script/game/data/LoginData.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/AppData.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/GameData.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/StorageData.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/tween/RotateAround.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/tween/UIOpenAndClose.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/HttpData.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/tween/FlyNode.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/module/PigBankData.js"},{"deps":{"./TweenEasing":51},"path":"preview-scripts/assets/script/game/component/tween/UITween.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/AdData.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/WechatData.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/module/HelpData.js"},{"deps":{"./FunBtns":12},"path":"preview-scripts/assets/script/game/module/game/Game.js"},{"deps":{"./AdData":63,"./AppData":54,"./HttpData":59,"./GameData":55,"./LoginData":53,"./WechatData":64,"./StorageData":56,"./module/HelpData":65,"./module/PigBankData":61},"path":"preview-scripts/assets/script/game/data/g.js"},{"deps":{},"path":"preview-scripts/assets/script/game/data/module/SignData.js"},{"deps":{},"path":"preview-scripts/assets/script/game/component/Button.js"},{"deps":{},"path":"preview-scripts/assets/script/game/module/module/turntable/TurnableItem.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidInterstitialJS.js"},{"deps":{"./ATSDKMgr":73,"../zgSingleton":16},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATNative.js"},{"deps":{"../../../../system/JsbSystem":21,"../zgSingleton":16,"./ATNative":72,"./ATRewardVideo":77},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATSDKMgr.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATNativeJS.js"},{"deps":{"./ATSDKMgr":73,"../zgSingleton":16},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATInterstitial.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATInterstitialJS.js"},{"deps":{"../zgSingleton":16,"./ATSDKMgr":73},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideo.js"},{"deps":{"./iOS/ATiOSInterstitialJS":88,"./Android/ATAndroidInterstitialJS":71},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATInterstitialJSSDK.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATSDKMgrJS.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATRewardVideoJS.js"},{"deps":{"./Android/ATAndroidRewardedVideoJS":92,"./iOS/ATiOSRewardedVideoJS":93},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATRewardedVideoJSSDK.js"},{"deps":{"./Android/ATAndroidJS":89,"./iOS/ATiOSJS":91},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATJSSDK.js"},{"deps":{"./Android/ATAndroidNativeJS":85,"./iOS/ATiOSNativeJS":90},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATNativeJSSDK.js"},{"deps":{"../zgSingleton":16,"./ATSDKMgr":73},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAdsMgr/ATBanner.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidNativeJS.js"},{"deps":{"./Android/ATAndroidBannerJS":87,"./iOS/ATiOSBannerJS":6},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/ATBannerJSSDK.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidBannerJS.js"},{"deps":{"ATiOSJS":91},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSInterstitialJS.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidJS.js"},{"deps":{"ATiOSJS":91},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSNativeJS.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSJS.js"},{"deps":{},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/Android/ATAndroidRewardedVideoJS.js"},{"deps":{"ATiOSJS":91},"path":"preview-scripts/assets/script/mk/sdk/ad/toppon/AnyThinkAds/iOS/ATiOSRewardedVideoJS.js"}];
  3. var entries = ["preview-scripts/__qc_index__.js"];
  4. var bundleScript = 'preview-scripts/__qc_bundle__.js';
  5. /**
  6. * Notice: This file can not use ES6 (for IE 11)
  7. */
  8. var modules = {};
  9. var name2path = {};
  10. // Will generated by module.js plugin
  11. // var scripts = ${scripts};
  12. // var entries = ${entries};
  13. // var bundleScript = ${bundleScript};
  14. if (typeof global === 'undefined') {
  15. window.global = window;
  16. }
  17. var isJSB = typeof jsb !== 'undefined';
  18. function getXMLHttpRequest () {
  19. return window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('MSXML2.XMLHTTP');
  20. }
  21. function downloadText(url, callback) {
  22. if (isJSB) {
  23. var result = jsb.fileUtils.getStringFromFile(url);
  24. callback(null, result);
  25. return;
  26. }
  27. var xhr = getXMLHttpRequest(),
  28. errInfo = 'Load text file failed: ' + url;
  29. xhr.open('GET', url, true);
  30. if (xhr.overrideMimeType) xhr.overrideMimeType('text\/plain; charset=utf-8');
  31. xhr.onload = function () {
  32. if (xhr.readyState === 4) {
  33. if (xhr.status === 200 || xhr.status === 0) {
  34. callback(null, xhr.responseText);
  35. }
  36. else {
  37. callback({status:xhr.status, errorMessage:errInfo + ', status: ' + xhr.status});
  38. }
  39. }
  40. else {
  41. callback({status:xhr.status, errorMessage:errInfo + '(wrong readyState)'});
  42. }
  43. };
  44. xhr.onerror = function(){
  45. callback({status:xhr.status, errorMessage:errInfo + '(error)'});
  46. };
  47. xhr.ontimeout = function(){
  48. callback({status:xhr.status, errorMessage:errInfo + '(time out)'});
  49. };
  50. xhr.send(null);
  51. };
  52. function loadScript (src, cb) {
  53. if (typeof require !== 'undefined') {
  54. require(src);
  55. return cb();
  56. }
  57. // var timer = 'load ' + src;
  58. // console.time(timer);
  59. var scriptElement = document.createElement('script');
  60. function done() {
  61. // console.timeEnd(timer);
  62. // deallocation immediate whatever
  63. scriptElement.remove();
  64. }
  65. scriptElement.onload = function () {
  66. done();
  67. cb();
  68. };
  69. scriptElement.onerror = function () {
  70. done();
  71. var error = 'Failed to load ' + src;
  72. console.error(error);
  73. cb(new Error(error));
  74. };
  75. scriptElement.setAttribute('type','text/javascript');
  76. scriptElement.setAttribute('charset', 'utf-8');
  77. scriptElement.setAttribute('src', src);
  78. document.head.appendChild(scriptElement);
  79. }
  80. function loadScripts (srcs, cb) {
  81. var n = srcs.length;
  82. srcs.forEach(function (src) {
  83. loadScript(src, function () {
  84. n--;
  85. if (n === 0) {
  86. cb();
  87. }
  88. });
  89. })
  90. }
  91. function formatPath (path) {
  92. let destPath = window.__quick_compile_project__.destPath;
  93. if (destPath) {
  94. let prefix = 'preview-scripts';
  95. if (destPath[destPath.length - 1] === '/') {
  96. prefix += '/';
  97. }
  98. path = path.replace(prefix, destPath);
  99. }
  100. return path;
  101. }
  102. window.__quick_compile_project__ = {
  103. destPath: '',
  104. registerModule: function (path, module) {
  105. path = formatPath(path);
  106. modules[path].module = module;
  107. },
  108. registerModuleFunc: function (path, func) {
  109. path = formatPath(path);
  110. modules[path].func = func;
  111. var sections = path.split('/');
  112. var name = sections[sections.length - 1];
  113. name = name.replace(/\.(?:js|ts|json)$/i, '');
  114. name2path[name] = path;
  115. },
  116. require: function (request, path) {
  117. var m, requestScript;
  118. path = formatPath(path);
  119. if (path) {
  120. m = modules[path];
  121. if (!m) {
  122. console.warn('Can not find module for path : ' + path);
  123. return null;
  124. }
  125. }
  126. if (m) {
  127. let depIndex = m.deps[request];
  128. // dependence script was excluded
  129. if (depIndex === -1) {
  130. return null;
  131. }
  132. else {
  133. requestScript = scripts[ m.deps[request] ];
  134. }
  135. }
  136. let requestPath = '';
  137. if (!requestScript) {
  138. // search from name2path when request is a dynamic module name
  139. if (/^[\w- .]*$/.test(request)) {
  140. requestPath = name2path[request];
  141. }
  142. if (!requestPath) {
  143. if (CC_JSB) {
  144. return require(request);
  145. }
  146. else {
  147. console.warn('Can not find deps [' + request + '] for path : ' + path);
  148. return null;
  149. }
  150. }
  151. }
  152. else {
  153. requestPath = formatPath(requestScript.path);
  154. }
  155. let requestModule = modules[requestPath];
  156. if (!requestModule) {
  157. console.warn('Can not find request module for path : ' + requestPath);
  158. return null;
  159. }
  160. if (!requestModule.module && requestModule.func) {
  161. requestModule.func();
  162. }
  163. if (!requestModule.module) {
  164. console.warn('Can not find requestModule.module for path : ' + path);
  165. return null;
  166. }
  167. return requestModule.module.exports;
  168. },
  169. run: function () {
  170. entries.forEach(function (entry) {
  171. entry = formatPath(entry);
  172. var module = modules[entry];
  173. if (!module.module) {
  174. module.func();
  175. }
  176. });
  177. },
  178. load: function (cb) {
  179. var self = this;
  180. var srcs = scripts.map(function (script) {
  181. var path = formatPath(script.path);
  182. modules[path] = script;
  183. if (script.mtime) {
  184. path += ("?mtime=" + script.mtime);
  185. }
  186. return path;
  187. });
  188. console.time && console.time('load __quick_compile_project__');
  189. // jsb can not analysis sourcemap, so keep separate files.
  190. if (bundleScript && !isJSB) {
  191. downloadText(formatPath(bundleScript), function (err, bundleSource) {
  192. console.timeEnd && console.timeEnd('load __quick_compile_project__');
  193. if (err) {
  194. console.error(err);
  195. return;
  196. }
  197. let evalTime = 'eval __quick_compile_project__ : ' + srcs.length + ' files';
  198. console.time && console.time(evalTime);
  199. var sources = bundleSource.split('\n//------QC-SOURCE-SPLIT------\n');
  200. for (var i = 0; i < sources.length; i++) {
  201. if (sources[i]) {
  202. window.eval(sources[i]);
  203. // not sure why new Function cannot set breakpoints precisely
  204. // new Function(sources[i])()
  205. }
  206. }
  207. self.run();
  208. console.timeEnd && console.timeEnd(evalTime);
  209. cb();
  210. })
  211. }
  212. else {
  213. loadScripts(srcs, function () {
  214. self.run();
  215. console.timeEnd && console.timeEnd('load __quick_compile_project__');
  216. cb();
  217. });
  218. }
  219. }
  220. };
  221. // Polyfill for IE 11
  222. if (!('remove' in Element.prototype)) {
  223. Element.prototype.remove = function () {
  224. if (this.parentNode) {
  225. this.parentNode.removeChild(this);
  226. }
  227. };
  228. }
  229. })();