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.
14 lines • 7 kB
JavaScript
!function(e){function t(e){var t=require("path").join(__dirname,""+e+"."+y+".hot-update.js");require("fs").readFile(t,"utf-8",function(e,r){if(e){if(f.onError)return f.onError(e);throw e}var n={};require("vm").runInThisContext("(function(exports) {"+r+"\n})",t)(n),a(n.id,n.modules)})}function r(e){var t=require("path").join(__dirname,""+y+".hot-update.json");require("fs").readFile(t,"utf-8",function(t,r){if(t)return e();try{var n=JSON.parse(r)}catch(o){return e(o)}e(null,n)})}function n(e){var t=E[e];if(!t)return f;var r=function(r){return t.hot.active?E[r]?(E[r].parents.indexOf(e)<0&&E[r].parents.push(e),t.children.indexOf(r)<0&&t.children.push(r)):v=[e]:(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),v=[]),f(r)};for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(r[n]=f[n]);return r.e=function(e,t){"ready"===x&&i("prepare"),w++,f.e(e,function(){function n(){w--,"prepare"===x&&(O[e]||u(e),0===w&&0===j&&c())}try{t.call(null,r)}finally{n()}})},r}function o(e){var t={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],active:!0,accept:function(e,r){if("undefined"==typeof e)t._selfAccepted=!0;else if("function"==typeof e)t._selfAccepted=e;else if("number"==typeof e)t._acceptedDependencies[e]=r;else for(var n=0;n<e.length;n++)t._acceptedDependencies[e[n]]=r},decline:function(e){if("undefined"==typeof e)t._selfDeclined=!0;else if("number"==typeof e)t._declinedDependencies[e]=!0;else for(var r=0;r<e.length;r++)t._declinedDependencies[e[r]]=!0},dispose:function(e){t._disposeHandlers.push(e)},addDisposeHandler:function(e){t._disposeHandlers.push(e)},removeDisposeHandler:function(e){var r=t._disposeHandlers.indexOf(e);r>=0&&t._disposeHandlers.splice(r,1)},check:s,apply:l,status:function(e){return e?void g.push(e):x},addStatusHandler:function(e){g.push(e)},removeStatusHandler:function(e){var t=g.indexOf(e);t>=0&&g.splice(t,1)},data:m[e]};return t}function i(e){x=e;for(var t=0;t<g.length;t++)g[t].call(null,e)}function s(e,t){if("idle"!==x)throw new Error("check() is only allowed in idle status");"function"==typeof e?(b=!1,t=e):(b=e,t=t||function(e){if(e)throw e}),i("check"),r(function(e,r){if(e)return t(e);if(!r)return i("idle"),void t(null,null);q={},_={},O={};for(var n=0;n<r.c.length;n++)_[r.c[n]]=!0;d=r.h,i("prepare"),p=t,h={};var o=0;u(o),0===w&&0===j&&c()})}function a(e,t){if(_[e]&&q[e]){q[e]=!1;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(h[r]=t[r]);0===--j&&0===w&&c()}}function u(e){_[e]?(q[e]=!0,j++,t(e)):O[e]=!0}function c(){i("ready");var e=p;if(p=null,e)if(b)l(b,e);else{var t=[];for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&t.push(+r);e(null,t)}}function l(t,r){function n(e){for(var t=[e],r=[],n=t.slice();n.length>0;){var i=n.pop(),e=E[i];if(e&&!e.hot._selfAccepted){if(e.hot._selfDeclined)return new Error("Aborted because of self decline: "+i);if(0===i)return;for(var s=0;s<e.parents.length;s++){var a=e.parents[s],u=E[a];if(u.hot._declinedDependencies[i])return new Error("Aborted because of declined dependency: "+i+" in "+a);t.indexOf(a)>=0||(u.hot._acceptedDependencies[i]?(r[a]||(r[a]=[]),o(r[a],[i])):(delete r[a],t.push(a),n.push(a)))}}}return[t,r]}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];e.indexOf(n)<0&&e.push(n)}}if("ready"!==x)throw new Error("apply() is only allowed in ready status");"function"==typeof t?(r=t,t={}):t&&"object"==typeof t?r=r||function(e){if(e)throw e}:(t={},r=r||function(e){if(e)throw e});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(t.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=[],g=0;g<a.length;g++){var l=a[g];E[l]&&E[l].hot._selfAccepted&&b.push({module:l,errorHandler:E[l].hot._selfAccepted})}i("dispose");for(var j=a.slice();j.length>0;){var l=j.pop(),w=E[l];if(w){for(var O={},q=w.hot._disposeHandlers,_=0;_<q.length;_++){var A=q[_];A(O)}m[l]=O,w.hot.active=!1,delete E[l];for(var _=0;_<w.children.length;_++){var k=E[w.children[_]];if(k){var D=k.parents.indexOf(l);D>=0&&(k.parents.splice(D,1),0===k.parents.length&&k.hot&&k.hot._disposeHandlers&&k.hot._disposeHandlers.length>0&&j.push(k.id))}}}}for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))for(var w=E[l],S=s[l],_=0;_<S.length;_++){var P=S[_],D=w.children.indexOf(P);D>=0&&w.children.splice(D,1)}i("apply"),y=d;for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(e[l]=u[l]);var N=null;for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l)){for(var w=E[l],S=s[l],H=[],g=0;g<S.length;g++){var P=S[g],A=w.hot._acceptedDependencies[P];H.indexOf(A)>=0||H.push(A)}for(var g=0;g<H.length;g++){var A=H[g];try{A(s)}catch(z){N||(N=z)}}}for(var g=0;g<b.length;g++){var F=b[g],l=F.module;v=[l];try{f(l)}catch(z){if("function"==typeof F.errorHandler)try{F.errorHandler(z)}catch(z){N||(N=z)}else N||(N=z)}}return N?(i("fail"),r(N)):(i("idle"),void r(null,a))}function f(t){if(E[t])return E[t].exports;var r=E[t]={exports:{},id:t,loaded:!1,hot:o(t),parents:v,children:[]};return e[t].call(r.exports,r,r.exports,n(t)),r.loaded=!0,r.exports}var p,h,d,b=!0,y="5b0895540e02318c89ef",m={},v=[],g=[],x="idle",j=0,w=0,O={},q={},_={},E={};return f.m=e,f.c=E,f.p="",f.h=function(){return y},n(0)(0)}([/*!*********************************!*\
!*** ./parsing/typeof/index.js ***!
\*********************************/
function(e,t,r){it("should not create a context for typeof require",function(){r(/*! ./typeof */2).should.be.eql("function")}),it("should answer typeof require correctly",function(){"function".should.be.eql("function")}),it("should answer typeof define correctly",function(){"function".should.be.eql("function")}),it("should answer typeof require.amd correctly",function(){(typeof r(/*! !webpack amd options */1)).should.be.eql("object")}),it("should answer typeof define.amd correctly",function(){(typeof r(/*! !webpack amd options */1)).should.be.eql("object")}),it("should answer typeof module correctly",function(){(typeof e).should.be.eql("object")}),it("should answer typeof exports correctly",function(){(typeof t).should.be.eql("object")}),it("should answer typeof require.include correctly",function(){"function".should.be.eql("function")}),it("should answer typeof require.ensure correctly",function(){"function".should.be.eql("function")}),it("should not parse filtered stuff",function(){})},/*!****************************************!*\
!*** (webpack)/buildin/amd-options.js ***!
\****************************************/
function(e,t){(function(t){e.exports=t}).call(t,{})},/*!**********************************!*\
!*** ./parsing/typeof/typeof.js ***!
\**********************************/
function(e){e.exports="function"}]);
/*
//@ sourceMappingURL=bundle.js.map
//# sourceMappingURL=bundle.js.map
*/