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.
572 lines (544 loc) • 23.8 kB
JavaScript
/******/ (function(modules) { // webpackBootstrap
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false,
/******/ hot: hotCreateModule(moduleId),
/******/ parents: [hotCurrentParent],
/******/ data: hotCurrentModuleData[moduleId],
/******/ children: []
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ function hotDownloadUpdateChunk(chunkId) {
/******/ var filename = require("path").join(__dirname, "" + chunkId + "." + hotCurrentHash + ".hot-update.js");
/******/ require("fs").readFile(filename, "utf-8", function(err, content) {
/******/ if(err) {
/******/ if(__webpack_require__.onError)
/******/ return __webpack_require__.onError(err);
/******/ else
/******/ throw err;
/******/ }
/******/ var chunk = {};
/******/ require("vm").runInThisContext("(function(exports) {" + content + "\n})", filename)(chunk);
/******/ hotAddUpdateChunk(chunk.id, chunk.modules);
/******/ });
/******/ }
/******/
/******/ function hotDownloadManifest(callback) {
/******/ var filename = require("path").join(__dirname, "" + hotCurrentHash + ".hot-update.json");
/******/ require("fs").readFile(filename, "utf-8", function(err, content) {
/******/ if(err) return callback();
/******/ try {
/******/ var update = JSON.parse(content);
/******/ } catch(e) {
/******/ return callback(e);
/******/ }
/******/ callback(null, update);
/******/ });
/******/ }
/******/
/******/
/******/
/******/
/******/
/******/
/******/ var hotApplyOnUpdate = true;
/******/ var hotCurrentHash = "899e58d9271c92c4574c";
/******/ var hotCurrentModuleData = {};
/******/ var hotCurrentParent = 0;
/******/
/******/ function hotCreateRequire(moduleId) {
/******/ var me = installedModules[moduleId];
/******/ var fn = function(request) {
/******/ if(installedModules[request] && installedModules[request].parents.indexOf(moduleId) < 0)
/******/ installedModules[request].parents.push(moduleId);
/******/ if(me && me.children.indexOf(request) < 0)
/******/ me.children.push(request);
/******/ hotCurrentParent = moduleId;
/******/ return __webpack_require__(request);
/******/ };
/******/ fn.e = function(chunkId, callback) {
/******/ if(hotStatus === "ready")
/******/ hotSetStatus("prepare");
/******/ hotChunksLoading++;
/******/ __webpack_require__.e(chunkId, function() {
/******/ try {
/******/ callback.call(null, fn);
/******/ } finally {
/******/ finishChunkLoading();
/******/ }
/******/ function finishChunkLoading() {
/******/ hotChunksLoading--;
/******/ if(hotStatus === "prepare") {
/******/ if(!hotWaitingFilesMap[chunkId]) {
/******/ hotEnsureUpdateChunk(chunkId);
/******/ }
/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
/******/ hotUpdateDownloaded();
/******/ }
/******/ }
/******/ }
/******/ });
/******/ }
/******/ for(var name in __webpack_require__)
/******/ fn[name] = __webpack_require__[name];
/******/ return fn;
/******/ }
/******/
/******/ function hotCreateModule(moduleId) {
/******/ var hot = {
/******/ // private stuff
/******/ _acceptedDependencies: {},
/******/ _declinedDependencies: {},
/******/ _selfAccepted: false,
/******/ _selfDeclined: false,
/******/ _disposeHandlers: [],
/******/
/******/ // Module API
/******/ accept: function(dep, callback) {
/******/ if(typeof dep === "undefined")
/******/ hot._selfAccepted = true;
/******/ else if(typeof dep === "number")
/******/ hot._acceptedDependencies[dep] = callback;
/******/ else for(var i = 0; i < dep.length; i++)
/******/ hot._acceptedDependencies[dep[i]] = callback;
/******/ },
/******/ decline: function(dep) {
/******/ if(typeof dep === "undefined")
/******/ hot._selfDeclined = true;
/******/ else if(typeof dep === "number")
/******/ hot._declinedDependencies[dep] = true;
/******/ else for(var i = 0; i < dep.length; i++)
/******/ hot._declinedDependencies[dep[i]] = true;
/******/ },
/******/ dispose: function(callback) {
/******/ hot._disposeHandlers.push(callback);
/******/ },
/******/ addDisposeHandler: function(callback) {
/******/ hot._disposeHandlers.push(callback);
/******/ },
/******/ removeDisposeHandler: function(callback) {
/******/ var idx = hot._disposeHandlers.indexOf(callback);
/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1);
/******/ },
/******/
/******/ // Management API
/******/ check: hotCheck,
/******/ apply: hotApply,
/******/ setApplyOnUpdate: function(applyOnUpdate) {
/******/ hotApplyOnUpdate = applyOnUpdate;
/******/ },
/******/ status: function(l) {
/******/ if(!l) return hotStatus;
/******/ hotStatusHandlers.push(l);
/******/ },
/******/ addStatusHandler: function(l) {
/******/ hotStatusHandlers.push(l);
/******/ },
/******/ removeStatusHandler: function(l) {
/******/ var idx = hotStatusHandlers.indexOf(l);
/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
/******/ }
/******/ };
/******/ return hot;
/******/ }
/******/
/******/ var hotStatusHandlers = [];
/******/ var hotStatus = "idle";
/******/
/******/ function hotSetStatus(newStatus) {
/******/ var oldStatus = hotStatus;
/******/ hotStatus = newStatus;
/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
/******/ hotStatusHandlers[i].call(null, newStatus);
/******/ }
/******/
/******/ // while downloading
/******/ var hotWaitingFiles = 0;
/******/ var hotChunksLoading = 0;
/******/ var hotWaitingFilesMap = {};
/******/ var hotAvailibleFilesMap = {};
/******/ var hotCallback;
/******/
/******/ // The update info
/******/ var hotUpdate, hotUpdateNewHash;
/******/
/******/ function hotCheck(callback) {
/******/ callback = callback || function(err) { if(err) throw err };
/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
/******/ hotSetStatus("check");
/******/ hotDownloadManifest(function(err, update) {
/******/ if(err) return callback(err);
/******/ if(!update) {
/******/ hotSetStatus("idle");
/******/ callback(null, null);
/******/ return;
/******/ }
/******/
/******/ hotAvailibleFilesMap = {};
/******/ hotWaitingFilesMap = {};
/******/ for(var i = 0; i < update.c.length; i++)
/******/ hotAvailibleFilesMap[update.c[i]] = true;
/******/ hotUpdateNewHash = update.h;
/******/
/******/ hotSetStatus("prepare");
/******/ hotCallback = callback;
/******/ hotUpdate = {};
/******/ var chunkId = 0; {
/******/ hotEnsureUpdateChunk(chunkId);
/******/ }
/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
/******/ hotUpdateDownloaded();
/******/ }
/******/ });
/******/ }
/******/
/******/ function hotAddUpdateChunk(chunkId, moreModules) {
/******/ for(var moduleId in moreModules) {
/******/ hotUpdate[moduleId] = moreModules[moduleId];
/******/ }
/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
/******/ hotUpdateDownloaded();
/******/ }
/******/ }
/******/
/******/ function hotEnsureUpdateChunk(chunkId) {
/******/ if(!hotAvailibleFilesMap[chunkId]) {
/******/ hotWaitingFilesMap[chunkId] = true;
/******/ } else {
/******/ hotWaitingFiles++;
/******/ hotDownloadUpdateChunk(chunkId);
/******/ }
/******/ }
/******/
/******/ function hotUpdateDownloaded() {
/******/ hotSetStatus("ready");
/******/ var callback = hotCallback;
/******/ hotCallback = null;
/******/ if(!callback) return;
/******/ if(hotApplyOnUpdate) {
/******/ hotApply(callback);
/******/ } else {
/******/ var outdatedModules = [];
/******/ for(var id in hotUpdate) {
/******/ outdatedModules.push(+id);
/******/ }
/******/ callback(null, outdatedModules);
/******/ }
/******/ }
/******/
/******/ function hotApply(callback) {
/******/ callback = callback || function(err) { if(err) throw err };
/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
/******/
/******/ // at begin all updates modules are outdated
/******/ // the "outdated" status can propagate to parents if they don't accept the children
/******/ var outdatedDependencies = {};
/******/ var outdatedModules = [];
/******/ for(var id in hotUpdate) {
/******/ outdatedModules.push(+id);
/******/ }
/******/ var queue = outdatedModules.slice();
/******/ while(queue.length > 0) {
/******/ var moduleId = queue.pop();
/******/ var module = installedModules[moduleId];
/******/ if(!module || module.hot._selfAccepted)
/******/ continue;
/******/ if(module.hot._selfDeclined) {
/******/ hotSetStatus("abort");
/******/ return callback(new Error("Aborted because of self decline: " + moduleId));
/******/ }
/******/ if(moduleId === 0) {
/******/ hotSetStatus("abort");
/******/ return callback(new Error("Aborted because of bubbling"));
/******/ }
/******/ for(var i = 0; i < module.parents.length; i++) {
/******/ var parentId = module.parents[i];
/******/ var parent = installedModules[parentId];
/******/ if(parent.hot._declinedDependencies[moduleId]) {
/******/ hotSetStatus("abort");
/******/ return callback(new Error("Aborted because of declined dependency: " + moduleId + " in " + parentId));
/******/ }
/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
/******/ if(parent.hot._acceptedDependencies[moduleId]) {
/******/ if(!outdatedDependencies[parentId]) outdatedDependencies[parentId] = [];
/******/ if(outdatedDependencies[parentId].indexOf(moduleId) >= 0) continue;
/******/ outdatedDependencies[parentId].push(moduleId);
/******/ continue;
/******/ }
/******/ delete outdatedDependencies[parentId];
/******/ outdatedModules.push(parentId);
/******/ queue.push(parentId);
/******/ }
/******/ }
/******/
/******/ // Store self accepted outdated modules to require them later by the module system
/******/ var outdatedSelfAcceptedModules = [];
/******/ for(var i = 0; i < outdatedModules.length; i++) {
/******/ var moduleId = outdatedModules[i];
/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
/******/ outdatedSelfAcceptedModules.push(moduleId);
/******/ }
/******/
/******/ // Now in "dispose" phase
/******/ hotSetStatus("dispose");
/******/ var queue = outdatedModules.slice();
/******/ while(queue.length > 0) {
/******/ var moduleId = queue.pop();
/******/ var module = installedModules[moduleId];
/******/ if(!module) continue;
/******/
/******/ var data = {};
/******/
/******/ // Call dispose handlers
/******/ var disposeHandlers = module.hot._disposeHandlers;
/******/ for(var j = 0; j < disposeHandlers.length; j++) {
/******/ var cb = disposeHandlers[j]
/******/ cb(data);
/******/ }
/******/ hotCurrentModuleData[moduleId] = data;
/******/
/******/ // remove module from cache
/******/ delete installedModules[moduleId];
/******/
/******/ // remove "parents" references from all children
/******/ for(var j = 0; j < module.children.length; j++) {
/******/ var child = installedModules[module.children[j]];
/******/ if(!child) continue;
/******/ var idx = child.parents.indexOf(moduleId);
/******/ if(idx >= 0) {
/******/ child.parents.splice(idx, 1);
/******/ if(child.parents.length === 0 && child.hot && child.hot._disposeHandlers && child.hot._disposeHandlers.length > 0) {
/******/ // Child has dispose handlers and no more references, dispose it too
/******/ queue.push(child.id);
/******/ }
/******/ }
/******/ }
/******/ }
/******/
/******/ // remove outdated dependency from module children
/******/ for(var moduleId in outdatedDependencies) {
/******/ var module = installedModules[moduleId];
/******/ var moduleOutdatedDependencies = outdatedDependencies[moduleId];
/******/ for(var j = 0; j < moduleOutdatedDependencies.length; j++) {
/******/ var dependency = moduleOutdatedDependencies[j];
/******/ var idx = module.children.indexOf(dependency);
/******/ if(idx >= 0) module.children.splice(idx, 1);
/******/ }
/******/ }
/******/
/******/ // Not in "apply" phase
/******/ hotSetStatus("apply");
/******/
/******/ hotCurrentHash = hotUpdateNewHash;
/******/
/******/ // insert new code
/******/ for(var moduleId in hotUpdate) {
/******/ modules[moduleId] = hotUpdate[moduleId];
/******/ }
/******/
/******/ // call accept handlers
/******/ var error = null;
/******/ for(var moduleId in outdatedDependencies) {
/******/ var module = installedModules[moduleId];
/******/ var moduleOutdatedDependencies = outdatedDependencies[moduleId];
/******/ var callbacks = [];
/******/ for(var i = 0; i < moduleOutdatedDependencies.length; i++) {
/******/ var dependency = moduleOutdatedDependencies[i];
/******/ var cb = module.hot._acceptedDependencies[dependency];
/******/ if(callbacks.indexOf(cb) >= 0) continue;
/******/ callbacks.push(cb);
/******/ }
/******/ for(var i = 0; i < callbacks.length; i++) {
/******/ var cb = callbacks[i];
/******/ try {
/******/ cb(outdatedDependencies);
/******/ } catch(err) {
/******/ if(!error)
/******/ error = err;
/******/ }
/******/ }
/******/ }
/******/ if(error) {
/******/ hotSetStatus("fail");
/******/ return callback(error);
/******/ }
/******/
/******/ // Load self accepted modules
/******/ for(var i = 0; i < outdatedSelfAcceptedModules.length; i++) {
/******/ var moduleId = outdatedSelfAcceptedModules[i];
/******/ hotCurrentParent = moduleId;
/******/ __webpack_require__(moduleId);
/******/ }
/******/
/******/ hotSetStatus("idle");
/******/ callback(null, outdatedModules);
/******/ }
/******/
/******/ // Load entry module and return exports
/******/ return hotCreateRequire(0)(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/*!**********************************!*\
!*** ./parsing/harmony/index.js ***!
\**********************************/
/***/ function(module, exports, __webpack_require__) {
it("should import an identifier from a module", function() {
var __WEBPACK_IMPORTED_MODULE_63_93__ = __webpack_require__(/*! abc */ 1), a = __WEBPACK_IMPORTED_MODULE_63_93__["a"], B = __WEBPACK_IMPORTED_MODULE_63_93__["b"];
a.should.be.eql("a");
B.should.be.eql("b");
});
it("should exports should be enumberable", function() {
var abc = __webpack_require__(/*! abc */ 1);
var array = [];
for(var x in abc) {
array.push(x);
}
array.should.be.eql(["a", "b", "c"]);
});
it("should import a module with module statement", function() {
var __WEBPACK_IMPORTED_MODULE_407_448__ = __webpack_require__(/*! importWithModule */ 2), value = __WEBPACK_IMPORTED_MODULE_407_448__["value"];
Object.keys(value).should.be.eql(["a", "b", "c"]);
});
it("should import a module"/*, function() {
import def from "def";
def.should.be.eql("def");
}*/);
it("should export functions", function() {
var __WEBPACK_IMPORTED_MODULE_662_695__ = __webpack_require__(/*! exportKinds */ 3), fn = __WEBPACK_IMPORTED_MODULE_662_695__["fn"];
fn.should.have.type("function");
fn().should.be.eql("fn");
});
it("should multiple variables with one statement", function() {
var __WEBPACK_IMPORTED_MODULE_833_872__ = __webpack_require__(/*! exportKinds */ 3), one = __WEBPACK_IMPORTED_MODULE_833_872__["one"], two = __WEBPACK_IMPORTED_MODULE_833_872__["two"];
one.should.be.eql("one");
two.should.be.eql("two");
});
it("should still be able to use exported stuff", function() {
var __WEBPACK_IMPORTED_MODULE_1001_1044__ = __webpack_require__(/*! exportKinds */ 3), test1 = __WEBPACK_IMPORTED_MODULE_1001_1044__["test1"], test2 = __WEBPACK_IMPORTED_MODULE_1001_1044__["test2"];
test1.should.be.eql("fn");
test2.should.be.eql("two");
});
it("should reexport a module", function() {
var __WEBPACK_IMPORTED_MODULE_1158_1208__ = __webpack_require__(/*! reexport */ 4), a = __WEBPACK_IMPORTED_MODULE_1158_1208__["a"], b = __WEBPACK_IMPORTED_MODULE_1158_1208__["b"], c = __WEBPACK_IMPORTED_MODULE_1158_1208__["c"], o = __WEBPACK_IMPORTED_MODULE_1158_1208__["o"], two = __WEBPACK_IMPORTED_MODULE_1158_1208__["two"], test1 = __WEBPACK_IMPORTED_MODULE_1158_1208__["test1"];
a.should.be.eql("a");
b.should.be.eql("b");
c.should.be.eql("c");
o.should.be.eql("one");
two.should.be.eql("two");
(typeof test1).should.be.eql("undefined");
});
it("should support inline modules", function() {
var __WEBPACK_IMPORTED_MODULE_1439_1502__ = __webpack_require__(/*! inlineModule */ 5), a = __WEBPACK_IMPORTED_MODULE_1439_1502__["a"], getValue = __WEBPACK_IMPORTED_MODULE_1439_1502__["getValue"], setValue = __WEBPACK_IMPORTED_MODULE_1439_1502__["setValue"], g = __WEBPACK_IMPORTED_MODULE_1439_1502__["g"], s = __WEBPACK_IMPORTED_MODULE_1439_1502__["s"], gg = __WEBPACK_IMPORTED_MODULE_1439_1502__["gg"];
a.should.be.eql("a");
getValue().should.be.eql(123);
g().should.be.eql(123);
gg().should.be.eql(123);
setValue(456)
getValue().should.be.eql(456);
g().should.be.eql(456);
gg().should.be.eql(123);
s(135)
getValue().should.be.eql(135);
g().should.be.eql(135);
gg().should.be.eql(123);
});
/***/ },
/* 1 */
/*!**********************************!*\
!*** ./parsing/harmony/~/abc.js ***!
\**********************************/
/***/ function(module, exports, __webpack_require__) {
{var a = "a";;Object.defineProperty(exports, "a", {configurable: false, enumerable: true, get: function() { return a; }});}
{var b = "b";;Object.defineProperty(exports, "b", {configurable: false, enumerable: true, get: function() { return b; }});}
{var c = "c";;Object.defineProperty(exports, "c", {configurable: false, enumerable: true, get: function() { return c; }});}
/***/ },
/* 2 */
/*!***********************************************!*\
!*** ./parsing/harmony/~/importWithModule.js ***!
\***********************************************/
/***/ function(module, exports, __webpack_require__) {
var abc = __webpack_require__(/*! abc */ 1);
{var value = abc;;Object.defineProperty(exports, "value", {configurable: false, enumerable: true, get: function() { return value; }});}
/***/ },
/* 3 */
/*!******************************************!*\
!*** ./parsing/harmony/~/exportKinds.js ***!
\******************************************/
/***/ function(module, exports, __webpack_require__) {
{function fn() {
return "fn";
};Object.defineProperty(exports, "fn", {configurable: false, enumerable: true, get: function() { return fn; }});}
{var one = "one", two = "two";;Object.defineProperty(exports, "one", {configurable: false, enumerable: true, get: function() { return one; }});Object.defineProperty(exports, "two", {configurable: false, enumerable: true, get: function() { return two; }});}
{var test1 = fn();;Object.defineProperty(exports, "test1", {configurable: false, enumerable: true, get: function() { return test1; }});}
{var test2 = two;;Object.defineProperty(exports, "test2", {configurable: false, enumerable: true, get: function() { return test2; }});}
/***/ },
/* 4 */
/*!***************************************!*\
!*** ./parsing/harmony/~/reexport.js ***!
\***************************************/
/***/ function(module, exports, __webpack_require__) {
{var __WEBPACK_IMPORTED_MODULE_0_20__ = __webpack_require__(/*! abc */ 1);for(var __WEBPACK_IMPORT_NAME__ in __WEBPACK_IMPORTED_MODULE_0_20__) Object.defineProperty(exports, __WEBPACK_IMPORT_NAME__, { configurable: false, enumerable: true, get: (function(key) { return function() { return __WEBPACK_IMPORTED_MODULE_0_20__[key]; }; }(__WEBPACK_IMPORT_NAME__)) });;}
{var __WEBPACK_IMPORTED_MODULE_22_66__ = __webpack_require__(/*! exportKinds */ 3);Object.defineProperty(exports, "o", { configurable: false, enumerable: true, get: function() { return __WEBPACK_IMPORTED_MODULE_22_66__["one"]; } });Object.defineProperty(exports, "two", { configurable: false, enumerable: true, get: function() { return __WEBPACK_IMPORTED_MODULE_22_66__["two"]; } });;}
/***/ },
/* 5 */
/*!*******************************************!*\
!*** ./parsing/harmony/~/inlineModule.js ***!
\*******************************************/
/***/ function(module, exports, __webpack_require__) {
{ /* harmony module */ var __WEBPACK_LOCAL_MODULE_0__ = {}; !(function(exports) {{
var value = 123;
{var a = "a";;Object.defineProperty(exports, "a", {configurable: false, enumerable: true, get: function() { return a; }});}
{function getValue() {
return value;
};Object.defineProperty(exports, "getValue", {configurable: false, enumerable: true, get: function() { return getValue; }});}
{function setValue(v) {
value = v;
};Object.defineProperty(exports, "setValue", {configurable: false, enumerable: true, get: function() { return setValue; }});}
{Object.defineProperty(exports, "value", {configurable: false, enumerable: true, get: function() { return value; }});}
}}.call(this, __WEBPACK_LOCAL_MODULE_0__))}var gv = __WEBPACK_LOCAL_MODULE_0__["getValue"], sv = __WEBPACK_LOCAL_MODULE_0__["setValue"], v = __WEBPACK_LOCAL_MODULE_0__["value"];
{function g() {
return gv();
};Object.defineProperty(exports, "g", {configurable: false, enumerable: true, get: function() { return g; }});}
{function s(v) {
sv(v);
};Object.defineProperty(exports, "s", {configurable: false, enumerable: true, get: function() { return s; }});}
{function gg() {
return v;
};Object.defineProperty(exports, "gg", {configurable: false, enumerable: true, get: function() { return gg; }});}
for(var __WEBPACK_IMPORT_NAME__ in __WEBPACK_LOCAL_MODULE_0__) Object.defineProperty(exports, __WEBPACK_IMPORT_NAME__, { configurable: false, enumerable: true, get: (function(key) { return function() { return __WEBPACK_LOCAL_MODULE_0__[key]; }; }(__WEBPACK_IMPORT_NAME__)) });
/***/ }
/******/ ])