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.

203 lines (175 loc) 9.54 kB
/******/ (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 /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // 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 = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(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__)) }); /***/ } /******/ ])