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.
23 lines • 9.07 kB
JavaScript
!function(e){function t(t){if(p[t])return p[t].exports;var r=p[t]={exports:{},id:t,loaded:!1,hot:i(t),parents:[g],data:y[t],children:[]};return e[t].call(r.exports,r,r.exports,o(t)),r.loaded=!0,r.exports}function r(e){var r=require("path").join(__dirname,""+e+"."+m+".hot-update.js");require("fs").readFile(r,"utf-8",function(e,n){if(e){if(t.onError)return t.onError(e);throw e}var o={};require("vm").runInThisContext("(function(exports) {"+n+"\n})",r)(o),u(o.id,o.modules)})}function n(e){var t=require("path").join(__dirname,""+m+".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 o(e){var r=p[e],n=function(n){return p[n]&&p[n].parents.indexOf(e)<0&&p[n].parents.push(e),r&&r.children.indexOf(n)<0&&r.children.push(n),g=e,t(n)};n.e=function(e,r){"ready"===j&&s("prepare"),q++,t.e(e,function(){function t(){q--,"prepare"===j&&(O[e]||c(e),0===q&&0===w&&l())}try{r.call(null,n)}finally{t()}})};for(var o in t)n[o]=t[o];return n}function i(){var e={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],accept:function(t,r){if("undefined"==typeof t)e._selfAccepted=!0;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:a,apply:f,setApplyOnUpdate:function(e){v=e},status:function(e){return e?void x.push(e):j},addStatusHandler:function(e){x.push(e)},removeStatusHandler:function(e){var t=x.indexOf(e);t>=0&&x.splice(t,1)}};return e}function s(e){j=e;for(var t=0;t<x.length;t++)x[t].call(null,e)}function a(e){if(e=e||function(e){if(e)throw e},"idle"!==j)throw new Error("check() is only allowed in idle status");s("check"),n(function(t,r){if(t)return e(t);if(!r)return s("idle"),void e(null,null);_={},O={};for(var n=0;n<r.c.length;n++)_[r.c[n]]=!0;b=r.h,s("prepare"),d=e,h={};var o=0;c(o),0===q&&0===w&&l()})}function u(e,t){for(var r in t)h[r]=t[r];0===--w&&0===q&&l()}function c(e){_[e]?(w++,r(e)):O[e]=!0}function l(){s("ready");var e=d;if(d=null,e)if(v)f(e);else{var t=[];for(var r in h)t.push(+r);e(null,t)}}function f(r){if(r=r||function(e){if(e)throw e},"ready"!==j)throw new Error("apply() is only allowed in ready status");var n={},o=[];for(var i in h)o.push(+i);for(var a=o.slice();a.length>0;){var u=a.pop(),c=p[u];if(c&&!c.hot._selfAccepted){if(c.hot._selfDeclined)return s("abort"),r(new Error("Aborted because of self decline: "+u));if(0===u)return s("abort"),r(new Error("Aborted because of bubbling"));for(var l=0;l<c.parents.length;l++){var f=c.parents[l],d=p[f];if(d.hot._declinedDependencies[u])return s("abort"),r(new Error("Aborted because of declined dependency: "+u+" in "+f));if(!(o.indexOf(f)>=0))if(d.hot._acceptedDependencies[u]){if(n[f]||(n[f]=[]),n[f].indexOf(u)>=0)continue;n[f].push(u)}else delete n[f],o.push(f),a.push(f)}}}for(var v=[],l=0;l<o.length;l++){var u=o[l];p[u]&&p[u].hot._selfAccepted&&v.push(u)}s("dispose");for(var a=o.slice();a.length>0;){var u=a.pop(),c=p[u];if(c){for(var x={},w=c.hot._disposeHandlers,q=0;q<w.length;q++){var O=w[q];O(x)}y[u]=x,delete p[u];for(var q=0;q<c.children.length;q++){var _=p[c.children[q]];if(_){var A=_.parents.indexOf(u);A>=0&&(_.parents.splice(A,1),0===_.parents.length&&_.hot&&_.hot._disposeHandlers&&_.hot._disposeHandlers.length>0&&a.push(_.id))}}}}for(var u in n)for(var c=p[u],k=n[u],q=0;q<k.length;q++){var E=k[q],A=c.children.indexOf(E);A>=0&&c.children.splice(A,1)}s("apply"),m=b;for(var u in h)e[u]=h[u];var D=null;for(var u in n){for(var c=p[u],k=n[u],S=[],l=0;l<k.length;l++){var E=k[l],O=c.hot._acceptedDependencies[E];S.indexOf(O)>=0||S.push(O)}for(var l=0;l<S.length;l++){var O=S[l];try{O(n)}catch(H){D||(D=H)}}}if(D)return s("fail"),r(D);for(var l=0;l<v.length;l++){var u=v[l];g=u,t(u)}s("idle"),r(null,o)}var p={};t.m=e,t.c=p,t.p="";var d,h,b,v=!0,m="fc3e31d4deb28acab14a",y={},g=0,x=[],j="idle",w=0,q=0,O={},_={};return o(0)(0)}([/*!**********************************!*\
!*** ./parsing/harmony/index.js ***!
\**********************************/
function(e,t,r){it("should import an identifier from a module",function(){var e=r(/*! abc */1),t=e.a,n=e.b;t.should.be.eql("a"),n.should.be.eql("b")}),it("should exports should be enumberable",function(){var e=r(/*! abc */1),t=[];for(var n in e)t.push(n);t.should.be.eql(["a","b","c"])}),it("should import a module with module statement",function(){var e=r(/*! importWithModule */3),t=e.value;Object.keys(t).should.be.eql(["a","b","c"])}),it("should import a module"),it("should export functions",function(){var e=r(/*! exportKinds */2),t=e.fn;t.should.have.type("function"),t().should.be.eql("fn")}),it("should multiple variables with one statement",function(){var e=r(/*! exportKinds */2),t=e.one,n=e.two;t.should.be.eql("one"),n.should.be.eql("two")}),it("should still be able to use exported stuff",function(){var e=r(/*! exportKinds */2),t=e.test1,n=e.test2;t.should.be.eql("fn"),n.should.be.eql("two")}),it("should reexport a module",function(){var e=r(/*! reexport */5),t=e.a,n=e.b,o=e.c,i=e.o,s=e.two,a=e.test1;t.should.be.eql("a"),n.should.be.eql("b"),o.should.be.eql("c"),i.should.be.eql("one"),s.should.be.eql("two"),(typeof a).should.be.eql("undefined")}),it("should support inline modules",function(){var e=r(/*! inlineModule */4),t=e.a,n=e.getValue,o=e.setValue,i=e.g,s=e.s,a=e.gg;t.should.be.eql("a"),n().should.be.eql(123),i().should.be.eql(123),a().should.be.eql(123),o(456),n().should.be.eql(456),i().should.be.eql(456),a().should.be.eql(123),s(135),n().should.be.eql(135),i().should.be.eql(135),a().should.be.eql(123)})},/*!**********************************!*\
!*** ./parsing/harmony/~/abc.js ***!
\**********************************/
function(e,t){var r="a";Object.defineProperty(t,"a",{configurable:!1,enumerable:!0,get:function(){return r}});var n="b";Object.defineProperty(t,"b",{configurable:!1,enumerable:!0,get:function(){return n}});var o="c";Object.defineProperty(t,"c",{configurable:!1,enumerable:!0,get:function(){return o}})},/*!******************************************!*\
!*** ./parsing/harmony/~/exportKinds.js ***!
\******************************************/
function(e,t){function r(){return"fn"}Object.defineProperty(t,"fn",{configurable:!1,enumerable:!0,get:function(){return r}});var n="one",o="two";Object.defineProperty(t,"one",{configurable:!1,enumerable:!0,get:function(){return n}}),Object.defineProperty(t,"two",{configurable:!1,enumerable:!0,get:function(){return o}});var i=r();Object.defineProperty(t,"test1",{configurable:!1,enumerable:!0,get:function(){return i}});var s=o;Object.defineProperty(t,"test2",{configurable:!1,enumerable:!0,get:function(){return s}})},/*!***********************************************!*\
!*** ./parsing/harmony/~/importWithModule.js ***!
\***********************************************/
function(e,t,r){var n=r(/*! abc */1),o=n;Object.defineProperty(t,"value",{configurable:!1,enumerable:!0,get:function(){return o}})},/*!*******************************************!*\
!*** ./parsing/harmony/~/inlineModule.js ***!
\*******************************************/
function(e,t){function r(){return s()}function n(e){a(e)}function o(){return u}var i={};!function(e){function t(){return n}function r(e){n=e}var n=123,o="a";Object.defineProperty(e,"a",{configurable:!1,enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"getValue",{configurable:!1,enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"setValue",{configurable:!1,enumerable:!0,get:function(){return r}}),Object.defineProperty(e,"value",{configurable:!1,enumerable:!0,get:function(){return n}})}.call(this,i);var s=i.getValue,a=i.setValue,u=i.value;Object.defineProperty(t,"g",{configurable:!1,enumerable:!0,get:function(){return r}}),Object.defineProperty(t,"s",{configurable:!1,enumerable:!0,get:function(){return n}}),Object.defineProperty(t,"gg",{configurable:!1,enumerable:!0,get:function(){return o}});for(var c in i)Object.defineProperty(t,c,{configurable:!1,enumerable:!0,get:function(e){return function(){return i[e]}}(c)})},/*!***************************************!*\
!*** ./parsing/harmony/~/reexport.js ***!
\***************************************/
function(e,t,r){var n=r(/*! abc */1);for(var o in n)Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:function(e){return function(){return n[e]}}(o)});var i=r(/*! exportKinds */2);Object.defineProperty(t,"o",{configurable:!1,enumerable:!0,get:function(){return i.one}}),Object.defineProperty(t,"two",{configurable:!1,enumerable:!0,get:function(){return i.two}})}]);
/*
//@ sourceMappingURL=bundle.js.map
//# sourceMappingURL=bundle.js.map
*/