webpack
Version:
Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.
26 lines • 7.14 kB
JavaScript
!function(t){function e(t){var e=require("path").join(__dirname,""+t+"."+m+".hot-update.js");require("fs").readFile(e,"utf-8",function(t,r){if(t){if(f.onError)return f.onError(t);throw t}var n={};require("vm").runInThisContext("(function(exports) {"+r+"\n})",e)(n),a(n.id,n.modules)})}function r(t){var e=require("path").join(__dirname,""+m+".hot-update.json");require("fs").readFile(e,"utf-8",function(e,r){if(e)return t();try{var n=JSON.parse(r)}catch(o){return t(o)}t(null,n)})}function n(t){var e=A[t];if(!e)return f;var r=function(r){return e.hot.active?A[r]?(A[r].parents.indexOf(t)<0&&A[r].parents.push(t),e.children.indexOf(r)<0&&e.children.push(r)):y=[t]:(console.warn("[HMR] unexpected require("+r+") from disposed module "+t),y=[]),f(r)};for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(r[n]=f[n]);return r.e=function(t,e){"ready"===x&&i("prepare"),w++,f.e(t,function(){function n(){w--,"prepare"===x&&(O[t]||u(t),0===w&&0===j&&c())}try{e.call(null,r)}finally{n()}})},r}function o(t){var e={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],active:!0,accept:function(t,r){if("undefined"==typeof t)e._selfAccepted=!0;else if("function"==typeof t)e._selfAccepted=t;else if("number"==typeof t)e._acceptedDependencies[t]=r;else for(var n=0;n<t.length;n++)e._acceptedDependencies[t[n]]=r},decline:function(t){if("undefined"==typeof t)e._selfDeclined=!0;else if("number"==typeof t)e._declinedDependencies[t]=!0;else for(var r=0;r<t.length;r++)e._declinedDependencies[t[r]]=!0},dispose:function(t){e._disposeHandlers.push(t)},addDisposeHandler:function(t){e._disposeHandlers.push(t)},removeDisposeHandler:function(t){var r=e._disposeHandlers.indexOf(t);r>=0&&e._disposeHandlers.splice(r,1)},check:s,apply:l,status:function(t){return t?void v.push(t):x},addStatusHandler:function(t){v.push(t)},removeStatusHandler:function(t){var e=v.indexOf(t);e>=0&&v.splice(e,1)},data:g[t]};return e}function i(t){x=t;for(var e=0;e<v.length;e++)v[e].call(null,t)}function s(t,e){if("idle"!==x)throw new Error("check() is only allowed in idle status");"function"==typeof t?(b=!1,e=t):(b=t,e=e||function(t){if(t)throw t}),i("check"),r(function(t,r){if(t)return e(t);if(!r)return i("idle"),void e(null,null);q={},E={},O={};for(var n=0;n<r.c.length;n++)E[r.c[n]]=!0;d=r.h,i("prepare"),p=e,h={};var o=0;u(o),0===w&&0===j&&c()})}function a(t,e){if(E[t]&&q[t]){q[t]=!1;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(h[r]=e[r]);0===--j&&0===w&&c()}}function u(t){E[t]?(q[t]=!0,j++,e(t)):O[t]=!0}function c(){i("ready");var t=p;if(p=null,t)if(b)l(b,t);else{var e=[];for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&e.push(+r);t(null,e)}}function l(e,r){function n(t){for(var e=[t],r=[],n=e.slice();n.length>0;){var i=n.pop(),t=A[i];if(t&&!t.hot._selfAccepted){if(t.hot._selfDeclined)return new Error("Aborted because of self decline: "+i);if(0===i)return;for(var s=0;s<t.parents.length;s++){var a=t.parents[s],u=A[a];if(u.hot._declinedDependencies[i])return new Error("Aborted because of declined dependency: "+i+" in "+a);e.indexOf(a)>=0||(u.hot._acceptedDependencies[i]?(r[a]||(r[a]=[]),o(r[a],[i])):(delete r[a],e.push(a),n.push(a)))}}}return[e,r]}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.indexOf(n)<0&&t.push(n)}}if("ready"!==x)throw new Error("apply() is only allowed in ready status");"function"==typeof e?(r=e,e={}):e&&"object"==typeof e?r=r||function(t){if(t)throw t}:(e={},r=r||function(t){if(t)throw t});var s={},a=[],u={};for(var c in h)if(Object.prototype.hasOwnProperty.call(h,c)){var l=+c,p=n(l);if(!p){if(e.ignoreUnaccepted)continue;return i("abort"),r(new Error("Aborted because "+l+" is not accepted"))}if(p instanceof Error)return i("abort"),r(p);u[l]=h[l],o(a,p[0]);for(var l in p[1])Object.prototype.hasOwnProperty.call(p[1],l)&&(s[l]||(s[l]=[]),o(s[l],p[1][l]))}for(var b=[],v=0;v<a.length;v++){var l=a[v];A[l]&&A[l].hot._selfAccepted&&b.push({module:l,errorHandler:A[l].hot._selfAccepted})}i("dispose");for(var j=a.slice();j.length>0;){var l=j.pop(),w=A[l];if(w){for(var O={},q=w.hot._disposeHandlers,E=0;E<q.length;E++){var k=q[E];k(O)}g[l]=O,w.hot.active=!1,delete A[l];for(var E=0;E<w.children.length;E++){var S=A[w.children[E]];if(S){var P=S.parents.indexOf(l);P>=0&&(S.parents.splice(P,1),0===S.parents.length&&S.hot&&S.hot._disposeHandlers&&S.hot._disposeHandlers.length>0&&j.push(S.id))}}}}for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))for(var w=A[l],_=s[l],E=0;E<_.length;E++){var N=_[E],P=w.children.indexOf(N);P>=0&&w.children.splice(P,1)}i("apply"),m=d;for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(t[l]=u[l]);var z=null;for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l)){for(var w=A[l],_=s[l],D=[],v=0;v<_.length;v++){var N=_[v],k=w.hot._acceptedDependencies[N];D.indexOf(k)>=0||D.push(k)}for(var v=0;v<D.length;v++){var k=D[v];try{k(s)}catch(F){z||(z=F)}}}for(var v=0;v<b.length;v++){var I=b[v],l=I.module;y=[l];try{f(l)}catch(F){if("function"==typeof I.errorHandler)try{I.errorHandler(F)}catch(F){z||(z=F)}else z||(z=F)}}return z?(i("fail"),r(z)):(i("idle"),void r(null,a))}function f(e){if(A[e])return A[e].exports;var r=A[e]={exports:{},id:e,loaded:!1,hot:o(e),parents:y,children:[]};return t[e].call(r.exports,r,r.exports,n(e)),r.loaded=!0,r.exports}var p,h,d,b=!0,m="cec491342d8326ff6f8c",g={},y=[],v=[],x="idle",j=0,w=0,O={},q={},E={},A={};return f.m=t,f.c=A,f.p="",f.h=function(){return m},n(0)(0)}(function(t){for(var e in t)switch(typeof t[e]){case"number":t[e]=t[t[e]];break;case"object":t[e]=function(e){var r=e.slice(1),n=t[e[0]];return function(t,e,o){n.apply(null,[t,e,o].concat(r))}}(t[e])}return t}([/*!****************************************!*\
!*** ./compile/deduplication/index.js ***!
\****************************************/
function(t,e,r){it("should load a duplicate module with different dependencies correctly",function(){var t=r(/*! ./dedupe1 */3),e=r(/*! ./dedupe2 */5);t.should.be.eql("dedupe1"),e.should.be.eql("dedupe2")})},/*!************************************!*\
!*** ./compile/deduplication/d.js ***!
\************************************/
function(t){t.exports="d"},/*!*************************************************!*\
!*** ./compile/deduplication/dedupe1/dupdep.js ***!
\*************************************************/
function(t){t.exports="edupe1"},/*!************************************************!*\
!*** ./compile/deduplication/dedupe1/index.js ***!
\************************************************/
[6,2],/*!*************************************************!*\
!*** ./compile/deduplication/dedupe2/dupdep.js ***!
\*************************************************/
function(t){t.exports="edupe2"},/*!************************************************!*\
!*** ./compile/deduplication/dedupe2/index.js ***!
\************************************************/
[6,4],/*!***********************************!*\
!*** template of 3 referencing 1 ***!
\***********************************/
function(t,e,r,n){t.exports=r(/*! ../d */1)+r(n)}]));
/*
//@ sourceMappingURL=bundle.js.map
//# sourceMappingURL=bundle.js.map
*/