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.
178 lines (159 loc) • 6.73 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
/******/ };
/******/
/******/ // 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/renaming/index.js ***!
\***********************************/
/***/ function(module, exports, __webpack_require__) {
var require;var require;var require;var __WEBPACK_AMD_DEFINE_RESULT__;var __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;var require;var require;var require;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;var require;/* WEBPACK VAR INJECTION */(function(module) {it("should be able to rename require by var", function() {
var cjsRequire; // just to make it difficult
var cjsRequire = require, cjsRequire2 = typeof require !== "undefined" && require;
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
});
it("should be able to rename require by assign", function() {
var cjsRequire, cjsRequire2;
(function() {
cjsRequire = require;
cjsRequire2 = typeof require === "function" && require;
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
}());
});
it("should be able to rename require by IIFE", function() {
(function(cjsRequire) {
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
}(require));
});
it("should be able to rename require by IIFE call", function() {
(function(somethingElse, cjsRequire) {
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
somethingElse.should.be.eql(123);
}.call(this, 123, typeof require === "function" ? require : "error"));
});
it("should be able to rename stuff by IIFE call", function() {
(function(_exports, _exports2, _module, _module2, _define, _define2, _require, _require2) {
!(__WEBPACK_AMD_DEFINE_RESULT__ = function(R, E, M) {
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
E.should.be.eql(exports);
_exports.should.be.eql(exports);
_exports2.should.be.eql(exports);
M.should.be.eql(module);
_module.should.be.eql(module);
_module2.should.be.eql(module);
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./file */ 1)], __WEBPACK_AMD_DEFINE_RESULT__ = function(file) {
file.should.be.eql("ok");
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}).call(this,
typeof exports !== 'undefined' ? exports : null,
exports,
typeof module !== 'undefined' ? module : null,
module,
__webpack_require__(/*! !webpack amd define */ 2),
__webpack_require__(/*! !webpack amd define */ 2),
typeof require !== 'undefined' ? require : null,
require);
});
it("should accept less parameters in a IIFE call", function() {
(function(r, require) {
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
(typeof require).should.be.eql("undefined");
}(require));
});
it("should accept more parameters in a IIFE call", function() {
(function() {
}(require));
});
it("should be able to rename stuff by IIFE call", function() {
(function(_exports, _module, _define, _require) {
!(__WEBPACK_AMD_DEFINE_RESULT__ = function(R, E, M) {
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
__webpack_require__(/*! ./file */ 1).should.be.eql("ok");
E.should.be.eql(exports);
_exports.should.be.eql(exports);
M.should.be.eql(module);
_module.should.be.eql(module);
}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}).call(this,
typeof exports !== 'undefined' ? exports : null,
typeof module !== 'undefined' ? module : null,
__webpack_require__(/*! !webpack amd define */ 2),
typeof require !== 'undefined' ? require : null);
});
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! (webpack)/buildin/module.js */ 3)(module)))
/***/ },
/* 1 */
/*!**********************************!*\
!*** ./parsing/renaming/file.js ***!
\**********************************/
/***/ function(module, exports, __webpack_require__) {
module.exports = "ok";
/***/ },
/* 2 */
/*!***************************************!*\
!*** (webpack)/buildin/amd-define.js ***!
\***************************************/
/***/ function(module, exports, __webpack_require__) {
module.exports = function() { throw new Error("define cannot be used indirect"); };
/***/ },
/* 3 */
/*!***********************************!*\
!*** (webpack)/buildin/module.js ***!
\***********************************/
/***/ function(module, exports, __webpack_require__) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
}
/***/ }
/******/ ])