UNPKG

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.

11 lines 7.56 kB
!function(e){function t(e){var t=require("path").join(__dirname,""+e+"."+m+".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,""+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 n(e){var t=A[e];if(!t)return f;var r=function(r){return t.hot.active?A[r]?(A[r].parents.indexOf(e)<0&&A[r].parents.push(e),t.children.indexOf(r)<0&&t.children.push(r)):g=[e]:(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),g=[]),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 v.push(e):x},addStatusHandler:function(e){v.push(e)},removeStatusHandler:function(e){var t=v.indexOf(e);t>=0&&v.splice(t,1)},data:y[e]};return t}function i(e){x=e;for(var t=0;t<v.length;t++)v[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={},E={},O={};for(var n=0;n<r.c.length;n++)E[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[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[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=A[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=A[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=[],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)}y[l]=O,w.hot.active=!1,delete A[l];for(var E=0;E<w.children.length;E++){var _=A[w.children[E]];if(_){var S=_.parents.indexOf(l);S>=0&&(_.parents.splice(S,1),0===_.parents.length&&_.hot&&_.hot._disposeHandlers&&_.hot._disposeHandlers.length>0&&j.push(_.id))}}}}for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))for(var w=A[l],P=s[l],E=0;E<P.length;E++){var N=P[E],S=w.children.indexOf(N);S>=0&&w.children.splice(S,1)}i("apply"),m=d;for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(e[l]=u[l]);var D=null;for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l)){for(var w=A[l],P=s[l],z=[],v=0;v<P.length;v++){var N=P[v],k=w.hot._acceptedDependencies[N];z.indexOf(k)>=0||z.push(k)}for(var v=0;v<z.length;v++){var k=z[v];try{k(s)}catch(F){D||(D=F)}}}for(var v=0;v<b.length;v++){var I=b[v],l=I.module;g=[l];try{f(l)}catch(F){if("function"==typeof I.errorHandler)try{I.errorHandler(F)}catch(F){D||(D=F)}else D||(D=F)}}return D?(i("fail"),r(D)):(i("idle"),void r(null,a))}function f(t){if(A[t])return A[t].exports;var r=A[t]={exports:{},id:t,loaded:!1,hot:o(t),parents:g,children:[]};return e[t].call(r.exports,r,r.exports,n(t)),r.loaded=!0,r.exports}var p,h,d,b=!0,m="0dc037dde0b522a81e3c",y={},g=[],v=[],x="idle",j=0,w=0,O={},q={},E={},A={};return f.m=e,f.c=A,f.p="",f.h=function(){return m},n(0)(0)}([/*!**************************************!*\ !*** ./loaders/json-loader/index.js ***! \**************************************/ function(e,t,r){it("should handle the json loader correctly",function(){r(/*! json!../../../../package.json */1).name.should.be.eql("webpack"),r(/*! ../../../../package.json */1).name.should.be.eql("webpack")})},/*!******************************************************!*\ !*** (webpack)/~/json-loader!(webpack)/package.json ***! \******************************************************/ function(e){e.exports={name:"webpack",version:"1.4.1-beta1",author:"Tobias Koppers @sokra",description:"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.",dependencies:{esprima:"~1.2.0",mkdirp:"~0.5.0",optimist:"~0.6.0","uglify-js":"~2.4.13",async:"~0.9.0","enhanced-resolve":"~0.7.0","memory-fs":"~0.1.0",clone:"~0.1.15","webpack-core":"~0.4.8","node-libs-browser":"~0.4.0",tapable:"~0.1.6"},licenses:[{type:"MIT",url:"http://www.opensource.org/licenses/mit-license.php"}],devDependencies:{mocha:"~1.21.1",should:"~4.0.4","vm-browserify":"~0.0.0",express:"~3.4.8","webpack-dev-middleware":"^1.0.0","worker-loader":"~0.5.0","raw-loader":"~0.5.0","json-loader":"~0.5.1","jade-loader":"~0.6.1","coffee-loader":"~0.7.1","css-loader":"~0.9.0","less-loader":"~0.7.0","style-loader":"~0.8.0","script-loader":"~0.6.0","bundle-loader":"~0.5.0","file-loader":"~0.7.2","url-loader":"~0.5.0","val-loader":"~0.5.0","i18n-webpack-plugin":"~0.2.0","extract-text-webpack-plugin":"~0.3.0","component-webpack-plugin":"~0.2.0"},engines:{node:">=0.6"},repository:{type:"git",url:"http://github.com/webpack/webpack.git"},homepage:"http://github.com/webpack/webpack",main:"lib/webpack.js",web:"lib/webpack.web.js",bin:"./bin/webpack.js",scripts:{test:"mocha --reporter spec",cover:"istanbul cover node_modules/mocha/bin/_mocha -- -R spec"}}}]); /* //@ sourceMappingURL=bundle.js.map //# sourceMappingURL=bundle.js.map */