Permalink
Browse files

updated examples

  • Loading branch information...
1 parent a925096 commit 86ca373134fe15724e03d1a71081679da314c76a @sokra sokra committed Mar 26, 2013
View
227 examples/code-splitted-require.context-amd/README.md
@@ -17,107 +17,139 @@ getTemplate("b", function(b) {
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ var installedChunks = {0:0};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
-/******/ if(installedChunks[chunkId] !== undefined)
-/******/ installedChunks[chunkId].push(callback);
-/******/ else {
-/******/ installedChunks[chunkId] = [callback];
-/******/ var head = document.getElementsByTagName('head')[0];
-/******/ var script = document.createElement('script');
-/******/ script.type = 'text/javascript';
-/******/ script.charset = 'utf-8';
-/******/ script.src = modules.c+""+chunkId+".output.js";
-/******/ head.appendChild(script);
-/******/ }
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
-/******/ var moduleId, chunkId, callbacks = [];
-/******/ while(chunkIds.length) {
-/******/ chunkId = chunkIds.shift();
-/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
-/******/ installedChunks[chunkId] = 0;
-/******/ }
-/******/ for(moduleId in moreModules)
-/******/ modules[moduleId] = moreModules[moduleId];
-/******/ while(callbacks.length)
-/******/ callbacks.shift().call(null, require);
-/******/ };
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// object to store loaded and loading chunks
+// "0" means "already loaded"
+// Array means "loading", array contains callbacks
+var installedChunks = {0:0};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+
+require.e = function requireEnsure(chunkId, callback) {
+ // "0" is the signal for "already loaded"
+ if(installedChunks[chunkId] === 0)
+ return callback.call(null, require);
+
+ // an array means "currently loading".
+ if(installedChunks[chunkId] !== undefined) {
+ installedChunks[chunkId].push(callback);
+ } else {
+ // start chunk loading
+ installedChunks[chunkId] = [callback];
+ var head = document.getElementsByTagName('head')[0];
+ var script = document.createElement('script');
+ script.type = 'text/javascript';
+ script.charset = 'utf-8';
+ script.src = modules.c + "" + chunkId + ".output.js";
+ head.appendChild(script);
+ }
+};
+require.modules = modules;
+require.cache = installedModules;
+
+// install a JSONP callback for chunk loading
+window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
+ // add "moreModules" to the modules object,
+ // then flag all "chunkIds" as loaded and fire callback
+ var moduleId, chunkId, callbacks = [];
+ while(chunkIds.length) {
+ chunkId = chunkIds.shift();
+ if(installedChunks[chunkId])
+ callbacks.push.apply(callbacks, installedChunks[chunkId]);
+ installedChunks[chunkId] = 0;
+ }
+ for(moduleId in moreModules)
+ modules[moduleId] = moreModules[moduleId];
+ while(callbacks.length)
+ callbacks.shift().call(null, require);
+};
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- function getTemplate(templateName, callback) {
- require.e/* require */(1, function(require) { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [require(/*! ../require.context/templates */ 1)("./"+templateName)]; (function(tmpl) {
- callback(tmpl());
- }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));});
- }
- getTemplate("a", function(a) {
- console.log(a);
- });
- getTemplate("b", function(b) {
- console.log(b);
- });
+function getTemplate(templateName, callback) {
+ require.e/* require */(1, function(require) { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [require(/*! ../require.context/templates */ 1)("./"+templateName)]; (function(tmpl) {
+ callback(tmpl());
+ }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));});
+}
+getTemplate("a", function(a) {
+ console.log(a);
+});
+getTemplate("b", function(b) {
+ console.log(b);
+});
/***/ }
-/******/ })
-
+})
```
# js/1.output.js
``` javascript
-webpackJsonp([1], {
+webpackJsonp([1],
+{
/***/ 1:
/*!*********************************************!*\
!*** ../require.context/templates ^\.\/.*$ ***!
\*********************************************/
/***/ function(module, exports, require) {
- var map = {
- "./a": 2,
- "./a.js": 2,
- "./b": 3,
- "./b.js": 3,
- "./c": 4,
- "./c.js": 4
- };
- function webpackContext(req) {
- return require(webpackContextResolve(req));
- };
- function webpackContextResolve(req) {
- return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());
- };
- webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
- };
- webpackContext.resolve = webpackContextResolve;
- module.exports = webpackContext;
-
+var map = {
+ "./a": 2,
+ "./a.js": 2,
+ "./b": 3,
+ "./b.js": 3,
+ "./c": 4,
+ "./c.js": 4
+};
+function webpackContext(req) {
+ return require(webpackContextResolve(req));
+};
+function webpackContextResolve(req) {
+ return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());
+};
+webpackContext.keys = function webpackContextKeys() {
+ return Object.keys(map);
+};
+webpackContext.resolve = webpackContextResolve;
+module.exports = webpackContext;
+
/***/ },
@@ -127,9 +159,9 @@ webpackJsonp([1], {
\*****************************************/
/***/ function(module, exports, require) {
- module.exports = function() {
- return "This text was generated by template A";
- }
+module.exports = function() {
+ return "This text was generated by template A";
+}
/***/ },
@@ -139,9 +171,9 @@ webpackJsonp([1], {
\*****************************************/
/***/ function(module, exports, require) {
- module.exports = function() {
- return "This text was generated by template B";
- }
+module.exports = function() {
+ return "This text was generated by template B";
+}
/***/ },
@@ -151,25 +183,27 @@ webpackJsonp([1], {
\*****************************************/
/***/ function(module, exports, require) {
- module.exports = function() {
- return "This text was generated by template C";
- }
+module.exports = function() {
+ return "This text was generated by template C";
+}
/***/ }
-})
+}
+)
```
# Info
## Uncompressed
```
-Hash: 053e43bcefccb7b19cd6a3e30104879a
-Time: 38ms
+Hash: 7a6425e8fe46dc01a0db9eee1a97caca
+Version: webpack 0.10.0-beta1
+Time: 54ms
Asset Size Chunks Chunk Names
- output.js 2476 0 main
-1.output.js 1589 1
+ output.js 2793 0 main
+1.output.js 1567 1
chunk {0} output.js (main) 261
[0] ./example.js 261 [built] {0}
chunk {1} 1.output.js 463 {0}
@@ -189,8 +223,9 @@ chunk {1} 1.output.js 463 {0}
## Minimized (uglify-js, no zip)
```
-Hash: 053e43bcefccb7b19cd6a3e30104879a
-Time: 155ms
+Hash: 7a6425e8fe46dc01a0db9eee1a97caca
+Version: webpack 0.10.0-beta1
+Time: 185ms
Asset Size Chunks Chunk Names
output.js 831 0 main
1.output.js 531 1
View
225 examples/code-splitted-require.context/README.md
@@ -17,107 +17,139 @@ getTemplate("b", function(b) {
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ var installedChunks = {0:0};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
-/******/ if(installedChunks[chunkId] !== undefined)
-/******/ installedChunks[chunkId].push(callback);
-/******/ else {
-/******/ installedChunks[chunkId] = [callback];
-/******/ var head = document.getElementsByTagName('head')[0];
-/******/ var script = document.createElement('script');
-/******/ script.type = 'text/javascript';
-/******/ script.charset = 'utf-8';
-/******/ script.src = modules.c+""+chunkId+".output.js";
-/******/ head.appendChild(script);
-/******/ }
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
-/******/ var moduleId, chunkId, callbacks = [];
-/******/ while(chunkIds.length) {
-/******/ chunkId = chunkIds.shift();
-/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
-/******/ installedChunks[chunkId] = 0;
-/******/ }
-/******/ for(moduleId in moreModules)
-/******/ modules[moduleId] = moreModules[moduleId];
-/******/ while(callbacks.length)
-/******/ callbacks.shift().call(null, require);
-/******/ };
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// object to store loaded and loading chunks
+// "0" means "already loaded"
+// Array means "loading", array contains callbacks
+var installedChunks = {0:0};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+require.e = function requireEnsure(chunkId, callback) {
+ // "0" is the signal for "already loaded"
+ if(installedChunks[chunkId] === 0)
+ return callback.call(null, require);
+
+ // an array means "currently loading".
+ if(installedChunks[chunkId] !== undefined) {
+ installedChunks[chunkId].push(callback);
+ } else {
+ // start chunk loading
+ installedChunks[chunkId] = [callback];
+ var head = document.getElementsByTagName('head')[0];
+ var script = document.createElement('script');
+ script.type = 'text/javascript';
+ script.charset = 'utf-8';
+ script.src = modules.c + "" + chunkId + ".output.js";
+ head.appendChild(script);
+ }
+};
+require.modules = modules;
+require.cache = installedModules;
+
+// install a JSONP callback for chunk loading
+window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
+ // add "moreModules" to the modules object,
+ // then flag all "chunkIds" as loaded and fire callback
+ var moduleId, chunkId, callbacks = [];
+ while(chunkIds.length) {
+ chunkId = chunkIds.shift();
+ if(installedChunks[chunkId])
+ callbacks.push.apply(callbacks, installedChunks[chunkId]);
+ installedChunks[chunkId] = 0;
+ }
+ for(moduleId in moreModules)
+ modules[moduleId] = moreModules[moduleId];
+ while(callbacks.length)
+ callbacks.shift().call(null, require);
+};
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- function getTemplate(templateName, callback) {
- require.e/*nsure*/(1, function(require) {
- callback(require(/*! ../require.context/templates */ 1)("./"+templateName)());
- });
- }
- getTemplate("a", function(a) {
- console.log(a);
- });
- getTemplate("b", function(b) {
- console.log(b);
+function getTemplate(templateName, callback) {
+ require.e/*nsure*/(1, function(require) {
+ callback(require(/*! ../require.context/templates */ 1)("./"+templateName)());
});
+}
+getTemplate("a", function(a) {
+ console.log(a);
+});
+getTemplate("b", function(b) {
+ console.log(b);
+});
/***/ }
-/******/ })
-
+})
```
# js/1.output.js
``` javascript
-webpackJsonp([1], {
+webpackJsonp([1],
+{
/***/ 1:
/*!*********************************************!*\
!*** ../require.context/templates ^\.\/.*$ ***!
\*********************************************/
/***/ function(module, exports, require) {
- var map = {
- "./a": 2,
- "./a.js": 2,
- "./b": 3,
- "./b.js": 3,
- "./c": 4,
- "./c.js": 4
- };
- function webpackContext(req) {
- return require(webpackContextResolve(req));
- };
- function webpackContextResolve(req) {
- return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());
- };
- webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
- };
- webpackContext.resolve = webpackContextResolve;
- module.exports = webpackContext;
-
+var map = {
+ "./a": 2,
+ "./a.js": 2,
+ "./b": 3,
+ "./b.js": 3,
+ "./c": 4,
+ "./c.js": 4
+};
+function webpackContext(req) {
+ return require(webpackContextResolve(req));
+};
+function webpackContextResolve(req) {
+ return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());
+};
+webpackContext.keys = function webpackContextKeys() {
+ return Object.keys(map);
+};
+webpackContext.resolve = webpackContextResolve;
+module.exports = webpackContext;
+
/***/ },
@@ -127,9 +159,9 @@ webpackJsonp([1], {
\*****************************************/
/***/ function(module, exports, require) {
- module.exports = function() {
- return "This text was generated by template A";
- }
+module.exports = function() {
+ return "This text was generated by template A";
+}
/***/ },
@@ -139,9 +171,9 @@ webpackJsonp([1], {
\*****************************************/
/***/ function(module, exports, require) {
- module.exports = function() {
- return "This text was generated by template B";
- }
+module.exports = function() {
+ return "This text was generated by template B";
+}
/***/ },
@@ -151,25 +183,27 @@ webpackJsonp([1], {
\*****************************************/
/***/ function(module, exports, require) {
- module.exports = function() {
- return "This text was generated by template C";
- }
+module.exports = function() {
+ return "This text was generated by template C";
+}
/***/ }
-})
+}
+)
```
# Info
## Uncompressed
```
-Hash: 64794fb1a8ae78099ec51cabeb1a694e
-Time: 37ms
+Hash: bfc8a0c89870057a328ac4537518a669
+Version: webpack 0.10.0-beta1
+Time: 52ms
Asset Size Chunks Chunk Names
- output.js 2364 0 main
-1.output.js 1589 1
+ output.js 2681 0 main
+1.output.js 1567 1
chunk {0} output.js (main) 276
[0] ./example.js 276 [built] {0}
chunk {1} 1.output.js 463 {0}
@@ -189,8 +223,9 @@ chunk {1} 1.output.js 463 {0}
## Minimized (uglify-js, no zip)
```
-Hash: 64794fb1a8ae78099ec51cabeb1a694e
-Time: 154ms
+Hash: bfc8a0c89870057a328ac4537518a669
+Version: webpack 0.10.0-beta1
+Time: 163ms
Asset Size Chunks Chunk Names
output.js 792 0 main
1.output.js 531 1
View
179 examples/code-splitting-bundle-loader/README.md
@@ -16,62 +16,94 @@ module.exports = "It works";
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ var installedChunks = {0:0};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
-/******/ if(installedChunks[chunkId] !== undefined)
-/******/ installedChunks[chunkId].push(callback);
-/******/ else {
-/******/ installedChunks[chunkId] = [callback];
-/******/ var head = document.getElementsByTagName('head')[0];
-/******/ var script = document.createElement('script');
-/******/ script.type = 'text/javascript';
-/******/ script.charset = 'utf-8';
-/******/ script.src = modules.c+""+chunkId+".output.js";
-/******/ head.appendChild(script);
-/******/ }
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
-/******/ var moduleId, chunkId, callbacks = [];
-/******/ while(chunkIds.length) {
-/******/ chunkId = chunkIds.shift();
-/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
-/******/ installedChunks[chunkId] = 0;
-/******/ }
-/******/ for(moduleId in moreModules)
-/******/ modules[moduleId] = moreModules[moduleId];
-/******/ while(callbacks.length)
-/******/ callbacks.shift().call(null, require);
-/******/ };
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// object to store loaded and loading chunks
+// "0" means "already loaded"
+// Array means "loading", array contains callbacks
+var installedChunks = {0:0};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+
+require.e = function requireEnsure(chunkId, callback) {
+ // "0" is the signal for "already loaded"
+ if(installedChunks[chunkId] === 0)
+ return callback.call(null, require);
+
+ // an array means "currently loading".
+ if(installedChunks[chunkId] !== undefined) {
+ installedChunks[chunkId].push(callback);
+ } else {
+ // start chunk loading
+ installedChunks[chunkId] = [callback];
+ var head = document.getElementsByTagName('head')[0];
+ var script = document.createElement('script');
+ script.type = 'text/javascript';
+ script.charset = 'utf-8';
+ script.src = modules.c + "" + chunkId + ".output.js";
+ head.appendChild(script);
+ }
+};
+require.modules = modules;
+require.cache = installedModules;
+
+// install a JSONP callback for chunk loading
+window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
+ // add "moreModules" to the modules object,
+ // then flag all "chunkIds" as loaded and fire callback
+ var moduleId, chunkId, callbacks = [];
+ while(chunkIds.length) {
+ chunkId = chunkIds.shift();
+ if(installedChunks[chunkId])
+ callbacks.push.apply(callbacks, installedChunks[chunkId]);
+ installedChunks[chunkId] = 0;
+ }
+ for(moduleId in moreModules)
+ modules[moduleId] = moreModules[moduleId];
+ while(callbacks.length)
+ callbacks.shift().call(null, require);
+};
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- require(/*! bundle!./file.js */ 1)(function(fileJsExports) {
- console.log(fileJsExports);
- });
+require(/*! bundle!./file.js */ 1)(function(fileJsExports) {
+ console.log(fileJsExports);
+});
/***/ },
@@ -81,53 +113,55 @@ module.exports = "It works";
\************************************************************************************/
/***/ function(module, exports, require) {
- var cbs = [],
- data;
- module.exports = function(cb) {
- if(cbs) cbs.push(cb);
- else cb(data);
+var cbs = [],
+ data;
+module.exports = function(cb) {
+ if(cbs) cbs.push(cb);
+ else cb(data);
+}
+require.e/*nsure*/(1, function(require) {
+ data = require(/*! !./file.js */ 2);
+ var callbacks = cbs;
+ cbs = null;
+ for(var i = 0, l = callbacks.length; i < l; i++) {
+ callbacks[i](data);
}
- require.e/*nsure*/(1, function(require) {
- data = require(/*! !./file.js */ 2);
- var callbacks = cbs;
- cbs = null;
- for(var i = 0, l = callbacks.length; i < l; i++) {
- callbacks[i](data);
- }
- });
+});
/***/ }
-/******/ })
-
+})
```
# js/1.output.js
``` javascript
-webpackJsonp([1], {
+webpackJsonp([1],
+{
/***/ 2:
/*!*****************!*\
!*** ./file.js ***!
\*****************/
/***/ function(module, exports, require) {
- module.exports = "It works";
+module.exports = "It works";
/***/ }
-})
+}
+)
```
# Info
## Uncompressed
```
-Hash: aaea93e88ddd185dbf5a5109059d3d08
-Time: 60ms
+Hash: d75e46ac811b482356205a47ab1dc1c0
+Version: webpack 0.10.0-beta1
+Time: 67ms
Asset Size Chunks Chunk Names
- output.js 2806 0 main
+ output.js 3109 0 main
1.output.js 184 1
chunk {0} output.js (main) 486
[0] ./example.js 88 [built] {0}
@@ -141,8 +175,9 @@ chunk {1} 1.output.js 28 {0}
## Minimized (uglify-js, no zip)
```
-Hash: aaea93e88ddd185dbf5a5109059d3d08
-Time: 146ms
+Hash: d75e46ac811b482356205a47ab1dc1c0
+Version: webpack 0.10.0-beta1
+Time: 155ms
Asset Size Chunks Chunk Names
output.js 853 0 main
1.output.js 56 1
View
167 examples/code-splitting/README.md
@@ -13,65 +13,97 @@ require.ensure(["c"], function(require) {
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ var installedChunks = {0:0};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
-/******/ if(installedChunks[chunkId] !== undefined)
-/******/ installedChunks[chunkId].push(callback);
-/******/ else {
-/******/ installedChunks[chunkId] = [callback];
-/******/ var head = document.getElementsByTagName('head')[0];
-/******/ var script = document.createElement('script');
-/******/ script.type = 'text/javascript';
-/******/ script.charset = 'utf-8';
-/******/ script.src = modules.c+""+chunkId+".output.js";
-/******/ head.appendChild(script);
-/******/ }
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
-/******/ var moduleId, chunkId, callbacks = [];
-/******/ while(chunkIds.length) {
-/******/ chunkId = chunkIds.shift();
-/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
-/******/ installedChunks[chunkId] = 0;
-/******/ }
-/******/ for(moduleId in moreModules)
-/******/ modules[moduleId] = moreModules[moduleId];
-/******/ while(callbacks.length)
-/******/ callbacks.shift().call(null, require);
-/******/ };
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// object to store loaded and loading chunks
+// "0" means "already loaded"
+// Array means "loading", array contains callbacks
+var installedChunks = {0:0};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+
+require.e = function requireEnsure(chunkId, callback) {
+ // "0" is the signal for "already loaded"
+ if(installedChunks[chunkId] === 0)
+ return callback.call(null, require);
+
+ // an array means "currently loading".
+ if(installedChunks[chunkId] !== undefined) {
+ installedChunks[chunkId].push(callback);
+ } else {
+ // start chunk loading
+ installedChunks[chunkId] = [callback];
+ var head = document.getElementsByTagName('head')[0];
+ var script = document.createElement('script');
+ script.type = 'text/javascript';
+ script.charset = 'utf-8';
+ script.src = modules.c + "" + chunkId + ".output.js";
+ head.appendChild(script);
+ }
+};
+require.modules = modules;
+require.cache = installedModules;
+
+// install a JSONP callback for chunk loading
+window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
+ // add "moreModules" to the modules object,
+ // then flag all "chunkIds" as loaded and fire callback
+ var moduleId, chunkId, callbacks = [];
+ while(chunkIds.length) {
+ chunkId = chunkIds.shift();
+ if(installedChunks[chunkId])
+ callbacks.push.apply(callbacks, installedChunks[chunkId]);
+ installedChunks[chunkId] = 0;
+ }
+ for(moduleId in moreModules)
+ modules[moduleId] = moreModules[moduleId];
+ while(callbacks.length)
+ callbacks.shift().call(null, require);
+};
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- var a = require(/*! a */ 2);
- var b = require(/*! b */ 1);
- require.e/*nsure*/(1, function(require) {
- require(/*! b */ 1).xyz();
- var d = require(/*! d */ 4);
- });
+var a = require(/*! a */ 2);
+var b = require(/*! b */ 1);
+require.e/*nsure*/(1, function(require) {
+ require(/*! b */ 1).xyz();
+ var d = require(/*! d */ 4);
+});
/***/ },
@@ -81,7 +113,7 @@ require.ensure(["c"], function(require) {
\****************/
/***/ function(module, exports, require) {
- // module b
+// module b
/***/ },
@@ -91,25 +123,25 @@ require.ensure(["c"], function(require) {
\****************/
/***/ function(module, exports, require) {
- // module a
+// module a
/***/ }
-/******/ })
-
+})
```
# js/1.output.js
``` javascript
-webpackJsonp([1], {
+webpackJsonp([1],
+{
/***/ 3:
/*!****************!*\
!*** ./~/c.js ***!
\****************/
/***/ function(module, exports, require) {
- // module c
+// module c
/***/ },
@@ -119,11 +151,12 @@ webpackJsonp([1], {
\****************/
/***/ function(module, exports, require) {
- // module d
+// module d
/***/ }
-})
+}
+)
```
Minimized
@@ -137,11 +170,12 @@ webpackJsonp([1],{3:function(){},4:function(){}});
## Uncompressed
```
-Hash: 3d676be1f90fd9a9422053e02c1982e7
-Time: 38ms
+Hash: 5543ff7619209e2d2e8aeebc12be7462
+Version: webpack 0.10.0-beta1
+Time: 42ms
Asset Size Chunks Chunk Names
- output.js 2529 0 main
-1.output.js 306 1
+ output.js 2844 0 main
+1.output.js 305 1
chunk {0} output.js (main) 166
[0] ./example.js 144 [built] {0}
[1] ./~/b.js 11 [built] {0}
@@ -159,8 +193,9 @@ chunk {1} 1.output.js 22 {0}
## Minimized (uglify-js, no zip)
```
-Hash: 3d676be1f90fd9a9422053e02c1982e7
-Time: 128ms
+Hash: 5543ff7619209e2d2e8aeebc12be7462
+Version: webpack 0.10.0-beta1
+Time: 135ms
Asset Size Chunks Chunk Names
output.js 744 0 main
1.output.js 50 1
View
124 examples/coffee-script/README.md
@@ -26,36 +26,55 @@ module.exports = 42
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ callback.call(null, require);
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+require.e = function requireEnsure(_, callback) {
+ callback.call(null, require);
+};
+require.modules = modules;
+require.cache = installedModules;
+
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- console.log(require(/*! ./cup1 */ 2));
+console.log(require(/*! ./cup1 */ 2));
/***/ },
@@ -65,11 +84,10 @@ module.exports = 42
\*********************/
/***/ function(module, exports, require) {
-
- console.log("yeah coffee-script");
-
- module.exports = 42;
-
+console.log("yeah coffee-script");
+
+module.exports = 42;
+
/***/ },
@@ -79,50 +97,50 @@ module.exports = 42
\*********************/
/***/ function(module, exports, require) {
-
- module.exports = {
- cool: "stuff",
- answer: 42,
- external: require(/*! ./cup2.coffee */ 1),
- again: require(/*! ./cup2 */ 1)
- };
-
+module.exports = {
+ cool: "stuff",
+ answer: 42,
+ external: require(/*! ./cup2.coffee */ 1),
+ again: require(/*! ./cup2 */ 1)
+};
-/***/ }
-/******/ })
+/***/ }
+})
```
# Info
## Uncompressed
```
-Hash: 30dcf8e5b6f3a18a2eb8eab2188e0643
-Time: 139ms
+Hash: 5394516f6bbce8cc020e6c170fd62636
+Version: webpack 0.10.0-beta1
+Time: 172ms
Asset Size Chunks Chunk Names
-output.js 1465 0 main
-chunk {0} output.js (main) 208
+output.js 1601 0 main
+chunk {0} output.js (main) 206
[0] ./example.js 31 [built] {0}
- [1] ./cup2.coffee 58 [built] {0}
- cjs require ./cup2 [2] ./cup1.coffee 6:9-26
- cjs require ./cup2.coffee [2] ./cup1.coffee 5:12-36
- [2] ./cup1.coffee 119 [built] {0}
+ [1] ./cup2.coffee 57 [built] {0}
+ cjs require ./cup2 [2] ./cup1.coffee 5:9-26
+ cjs require ./cup2.coffee [2] ./cup1.coffee 4:12-36
+ [2] ./cup1.coffee 118 [built] {0}
cjs require ./cup1 [0] ./example.js 1:12-29
```
## Minimized (uglify-js, no zip)
```
-Hash: 30dcf8e5b6f3a18a2eb8eab2188e0643
-Time: 382ms
+Hash: 5394516f6bbce8cc020e6c170fd62636
+Version: webpack 0.10.0-beta1
+Time: 228ms
Asset Size Chunks Chunk Names
output.js 418 0 main
-chunk {0} output.js (main) 208
+chunk {0} output.js (main) 206
[0] ./example.js 31 [built] {0}
- [1] ./cup2.coffee 58 [built] {0}
- cjs require ./cup2 [2] ./cup1.coffee 6:9-26
- cjs require ./cup2.coffee [2] ./cup1.coffee 5:12-36
- [2] ./cup1.coffee 119 [built] {0}
+ [1] ./cup2.coffee 57 [built] {0}
+ cjs require ./cup2 [2] ./cup1.coffee 5:9-26
+ cjs require ./cup2.coffee [2] ./cup1.coffee 4:12-36
+ [2] ./cup1.coffee 118 [built] {0}
cjs require ./cup1 [0] ./example.js 1:12-29
```
View
106 examples/commonjs/README.md
@@ -31,38 +31,57 @@ exports.add = function() {
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ callback.call(null, require);
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+
+require.e = function requireEnsure(_, callback) {
+ callback.call(null, require);
+};
+require.modules = modules;
+require.cache = installedModules;
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- var inc = require(/*! ./increment */ 1).increment;
- var a = 1;
- inc(a); // 2
+var inc = require(/*! ./increment */ 1).increment;
+var a = 1;
+inc(a); // 2
/***/ },
@@ -72,10 +91,10 @@ exports.add = function() {
\**********************/
/***/ function(module, exports, require) {
- var add = require(/*! ./math */ 2).add;
- exports.increment = function(val) {
- return add(val, 1);
- };
+var add = require(/*! ./math */ 2).add;
+exports.increment = function(val) {
+ return add(val, 1);
+};
/***/ },
@@ -85,28 +104,28 @@ exports.add = function() {
\*****************/
/***/ function(module, exports, require) {
- exports.add = function() {
- var sum = 0, i = 0, args = arguments, l = args.length;
- while (i < l) {
- sum += args[i++];
- }
- return sum;
- };
+exports.add = function() {
+ var sum = 0, i = 0, args = arguments, l = args.length;
+ while (i < l) {
+ sum += args[i++];
+ }
+ return sum;
+};
/***/ }
-/******/ })
-
+})
```
# Info
## Uncompressed
```
-Hash: 4c611f00cd8c22d720b7d5e5cf4d0cc2
-Time: 31ms
+Hash: b3372208595e483f54eaa29577bc99f8
+Version: webpack 0.10.0-beta1
+Time: 33ms
Asset Size Chunks Chunk Names
-output.js 1559 0 main
+output.js 1708 0 main
chunk {0} output.js (main) 329
[0] ./example.js 69 [built] {0}
[1] ./increment.js 98 [built] {0}
@@ -118,8 +137,9 @@ chunk {0} output.js (main) 329
## Minimized (uglify-js, no zip)
```
-Hash: 4c611f00cd8c22d720b7d5e5cf4d0cc2
-Time: 84ms
+Hash: b3372208595e483f54eaa29577bc99f8
+Version: webpack 0.10.0-beta1
+Time: 96ms
Asset Size Chunks Chunk Names
output.js 460 0 main
chunk {0} output.js (main) 329
View
134 examples/component/README.md
@@ -72,39 +72,58 @@ module.exports = {
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ callback.call(null, require);
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+
+require.e = function requireEnsure(_, callback) {
+ callback.call(null, require);
+};
+require.modules = modules;
+require.cache = installedModules;
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- console.log(require(/*! a-component */ 1));
- console.log(require(/*! b-component */ 9));
- console.log(require(/*! c-component */ 7));
-
+console.log(require(/*! a-component */ 1));
+console.log(require(/*! b-component */ 9));
+console.log(require(/*! c-component */ 7));
+
/***/ },
@@ -114,8 +133,8 @@ module.exports = {
\***************************************************/
/***/ function(module, exports, require) {
- require(/*! (webpack)/~/component-webpack-plugin/~/style-loader!(webpack)/~/component-webpack-plugin/~/css-loader!./style.css */ 4);
- module.exports = require(/*! ./index.js */ 6);
+require(/*! (webpack)/~/component-webpack-plugin/~/style-loader!(webpack)/~/component-webpack-plugin/~/css-loader!./style.css */ 4);
+module.exports = require(/*! ./index.js */ 6);
/***/ },
@@ -125,8 +144,8 @@ module.exports = {
\********************************************************************************************************************************************/
/***/ function(module, exports, require) {
- module.exports =
- ".a-component {\n\tdisplay: inline;\n\tbackground: url("+require(/*! ./image.png */ 5)+") repeat;\n}";
+module.exports =
+ ".a-component {\n\tdisplay: inline;\n\tbackground: url("+require(/*! ./image.png */ 5)+") repeat;\n}";
/***/ },
@@ -136,20 +155,20 @@ module.exports = {
\****************************************************************************************************************/
/***/ function(module, exports, require) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- module.exports = function(cssCode) {
- var styleElement = document.createElement("style");
- styleElement.type = "text/css";
- if (styleElement.styleSheet) {
- styleElement.styleSheet.cssText = cssCode;
- } else {
- styleElement.appendChild(document.createTextNode(cssCode));
- }
- document.getElementsByTagName("head")[0].appendChild(styleElement);
+/*
+ MIT License http://www.opensource.org/licenses/mit-license.php
+ Author Tobias Koppers @sokra
+*/
+module.exports = function(cssCode) {
+ var styleElement = document.createElement("style");
+ styleElement.type = "text/css";
+ if (styleElement.styleSheet) {
+ styleElement.styleSheet.cssText = cssCode;
+ } else {
+ styleElement.appendChild(document.createTextNode(cssCode));
}
+ document.getElementsByTagName("head")[0].appendChild(styleElement);
+}
/***/ },
@@ -159,7 +178,7 @@ module.exports = {
\*****************************************************************************************************************************************************************************************************************************************/
/***/ function(module, exports, require) {
- require(/*! (webpack)/~/component-webpack-plugin/~/style-loader/addStyle.js */ 3)(require(/*! !(webpack)/~/component-webpack-plugin/~/css-loader!./component/webpack-a-component/style.css */ 2))
+require(/*! (webpack)/~/component-webpack-plugin/~/style-loader/addStyle.js */ 3)(require(/*! !(webpack)/~/component-webpack-plugin/~/css-loader!./component/webpack-a-component/style.css */ 2))
/***/ },
@@ -169,7 +188,7 @@ module.exports = {
\*************************************************/
/***/ function(module, exports, require) {
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAOCAIAAABGj2DjAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACNSURBVChTlZC7FQAREEWFylCKEoS6EalBKNWZEoR2zrLrWbO/Gzjjc9/MIep/upNS8t63+pXukCAE33ON4/vgdo3j+6zvkNuLBybn409MDo4UY9Ra09q2CD9bCIFkQkpZSumnB8PBwZRSzbHWthNkODiYc45qY8zZBBP52Yicc692MPHqfPm6q4N5PLVunPxwQxP50QkAAAAASUVORK5CYII="
+module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAOCAIAAABGj2DjAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACNSURBVChTlZC7FQAREEWFylCKEoS6EalBKNWZEoR2zrLrWbO/Gzjjc9/MIep/upNS8t63+pXukCAE33ON4/vgdo3j+6zvkNuLBybn409MDo4UY9Ra09q2CD9bCIFkQkpZSumnB8PBwZRSzbHWthNkODiYc45qY8zZBBP52Yicc692MPHqfPm6q4N5PLVunPxwQxP50QkAAAAASUVORK5CYII="
/***/ },
@@ -179,7 +198,7 @@ module.exports = {
\************************************************/
/***/ function(module, exports, require) {
- module.exports = "A";
+module.exports = "A";
/***/ },
@@ -189,7 +208,7 @@ module.exports = {
\***************************************************/
/***/ function(module, exports, require) {
- module.exports = require(/*! ./main.js */ 8);
+module.exports = require(/*! ./main.js */ 8);
/***/ },
@@ -199,7 +218,7 @@ module.exports = {
\***********************************************/
/***/ function(module, exports, require) {
- module.exports = "C" + require(/*! a-component */ 1);
+module.exports = "C" + require(/*! a-component */ 1);
/***/ },
@@ -209,7 +228,7 @@ module.exports = {
\**********************************************/
/***/ function(module, exports, require) {
- module.exports = require(/*! ./main.js */ 10);
+module.exports = require(/*! ./main.js */ 10);
/***/ },
@@ -219,22 +238,22 @@ module.exports = {
\******************************************/
/***/ function(module, exports, require) {
- module.exports = "B";
+module.exports = "B";
/***/ }
-/******/ })
-
+})
```
# Info
## Uncompressed
```
-Hash: 9a9389bf1908b5568ad6f8fe413a0627
-Time: 120ms
+Hash: 90defdf491ebab80d48bd42ea1f7c17d
+Version: webpack 0.10.0-beta1
+Time: 124ms
Asset Size Chunks Chunk Names
-output.js 6031 0 main
+output.js 6167 0 main
chunk {0} output.js (main) 1981
[0] ./example.js 111 [built] {0}
[1] ./component/webpack-a-component (component) 328 [built] {0}
@@ -263,8 +282,9 @@ chunk {0} output.js (main) 1981
## Minimized (uglify-js, no zip)
```
-Hash: 3347ab710ad08b8494aec6ba77f9509b
-Time: 199ms
+Hash: 347d579347a144b45a78b34863b12b79
+Version: webpack 0.10.0-beta1
+Time: 466ms
Asset Size Chunks Chunk Names
output.js 1243 0 main
chunk {0} output.js (main) 1960
View
82 examples/i18n/README.md
@@ -33,52 +33,71 @@ module.exports = {
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ callback.call(null, require);
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+
+require.e = function requireEnsure(_, callback) {
+ callback.call(null, require);
+};
+require.modules = modules;
+require.cache = installedModules;
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- console.log("Hallo Welt");
- console.log("Missing Text");
+console.log("Hallo Welt");
+console.log("Missing Text");
/***/ }
-/******/ })
-
+})
```
# Info
## Uncompressed
```
-Hash: 6dd5f9550269e46e82b8dd537732bdfa
-Time: 17ms
+Hash: a738ac89a403e736beace631044222a3
+Version: webpack 0.10.0-beta1
+Time: 20ms
Asset Size Chunks Chunk Names
-output.js 989 0 main
+output.js 1139 0 main
chunk {0} output.js (main) 64
[0] ./example.js 64 [built] {0}
@@ -89,8 +108,9 @@ Missing localization: Missing Text
## Minimized (uglify-js, no zip)
```
-Hash: 6dd5f9550269e46e82b8dd537732bdfa
-Time: 52ms
+Hash: a738ac89a403e736beace631044222a3
+Version: webpack 0.10.0-beta1
+Time: 61ms
Asset Size Chunks Chunk Names
output.js 308 0 main
chunk {0} output.js (main) 64
View
106 examples/labeled-modules/README.md
@@ -30,38 +30,57 @@ exports: function add() {
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ callback.call(null, require);
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+
+require.e = function requireEnsure(_, callback) {
+ callback.call(null, require);
+};
+require.modules = modules;
+require.cache = installedModules;
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- var __WEBPACK_LABELED_MODULE__1 = require(/*! ./increment */ 1), increment = __WEBPACK_LABELED_MODULE__1.increment;
- var a = 1;
- increment(a); // 2
+var __WEBPACK_LABELED_MODULE__1 = require(/*! ./increment */ 1), increment = __WEBPACK_LABELED_MODULE__1.increment;
+var a = 1;
+increment(a); // 2
/***/ },
@@ -71,10 +90,10 @@ exports: function add() {
\**********************/
/***/ function(module, exports, require) {
- var __WEBPACK_LABELED_MODULE__2 = require(/*! ./math */ 2), add = __WEBPACK_LABELED_MODULE__2.add;
- exports: exports["increment"] = function increment(val) {
- return add(val, 1);
- };
+var __WEBPACK_LABELED_MODULE__2 = require(/*! ./math */ 2), add = __WEBPACK_LABELED_MODULE__2.add;
+exports: exports["increment"] = function increment(val) {
+ return add(val, 1);
+};
/***/ },
@@ -84,17 +103,16 @@ exports: function add() {
\*****************/
/***/ function(module, exports, require) {
- exports: exports["add"] = function add() {
- var sum = 0, i = 0, args = arguments, l = args.length;
- while (i < l) {
- sum += args[i++];
- }
- return sum;
- };
+exports: exports["add"] = function add() {
+ var sum = 0, i = 0, args = arguments, l = args.length;
+ while (i < l) {
+ sum += args[i++];
+ }
+ return sum;
+};
/***/ }
-/******/ })
-
+})
```
The remaining labels are removed while minimizing.
@@ -104,10 +122,11 @@ The remaining labels are removed while minimizing.
## Uncompressed
```
-Hash: 77a9971b44e556189b1ad3d848f5ea9c
-Time: 30ms
+Hash: 7167162ed42199dd8fc82db2097674eb
+Version: webpack 0.10.0-beta1
+Time: 35ms
Asset Size Chunks Chunk Names
-output.js 1727 0 main
+output.js 1876 0 main
chunk {0} output.js (main) 299
[0] ./example.js 55 [built] {0}
[1] ./increment.js 83 [built] {0}
@@ -119,8 +138,9 @@ chunk {0} output.js (main) 299
## Minimized (uglify-js, no zip)
```
-Hash: 77a9971b44e556189b1ad3d848f5ea9c
-Time: 82ms
+Hash: 7167162ed42199dd8fc82db2097674eb
+Version: webpack 0.10.0-beta1
+Time: 96ms
Asset Size Chunks Chunk Names
output.js 468 0 main
chunk {0} output.js (main) 299
View
95 examples/loader/README.md
@@ -34,41 +34,60 @@ module.exports = function(content) {
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ callback.call(null, require);
-/******/ };
-/******/ require.modules = modules;
-/******/ require.cache = installedModules;
-/******/ return require(0);
-/******/ })({
-/******/ c: "",
+(function(modules) { // webpackBootstrap
+// The module cache
+var installedModules = {};
+
+// The require function
+function 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(null, module, module.exports, require);
+
+ // Flag the module as loaded
+ module.loaded = true;
+
+ // Return the exports of the module
+ return module.exports;
+}
+
+require.e = function requireEnsure(_, callback) {
+ callback.call(null, require);
+};
+require.modules = modules;
+require.cache = installedModules;
+
+
+// Load entry module and return exports
+return require(0);
+})
+/************************************************************************/
+({
+// __webpack_public_path__
+c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
\********************/
/***/ function(module, exports, require) {
- // use our loader
- console.dir(require(/*! ./loader!./file */ 2));
-
- // use buildin json loader
- console.dir(require(/*! ./test.json */ 1)); // default by extension
- console.dir(require(/*! json!./test.json */ 1)); // manual
+// use our loader
+console.dir(require(/*! ./loader!./file */ 2));
+
+// use buildin json loader
+console.dir(require(/*! ./test.json */ 1)); // default by extension
+console.dir(require(/*! json!./test.json */ 1)); // manual
/***/ },
@@ -78,9 +97,9 @@ module.exports = function(content) {
\************************************************************************************/
/***/ function(module, exports, require) {
- module.exports = {
- "foobar": 1234
- }
+module.exports = {
+ "foobar": 1234
+}
/***/ },
@@ -90,12 +109,11 @@ module.exports = function(content) {
\*****************************/
/***/ function(module, exports, require) {
- exports.answer = 42;
- exports.foo = "bar";
+exports.answer = 42;
+exports.foo = "bar";
/***/ }
-/******/ })
-
+})
```
# Console output
@@ -113,10 +131,11 @@ Prints in node.js (`enhanced-require example.js`) and in browser:
## Uncompressed
```
-Hash: 2f64cd43907e15c39cc8d84534efe0a2
-Time: 50ms
+Hash: 5caaa03683d41f386ba25cd5e2812588
+Version: webpack 0.10.0-beta1
+Time: 57ms
Asset Size Chunks Chunk Names
-output.js 1743 0 main
+output.js 1889 0 main
chunk {0} output.js (main) 282
[0] ./example.js 205 [built] {0}
[1] (webpack)/~/json-loader!./test.json 36 [built] {0}
View
290 examples/mixed/README.md
@@ -75,76 +75,108 @@ require(
# js/output.js
``` javascript
-/******/ (function webpackBootstrap(modules) {
-/******/ var installedModules = {};
-/******/ var installedChunks = {0:0};
-/******/ function require(moduleId) {
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/ modules[moduleId].call(null, module, module.exports, require);
-/******/ module.loaded = true;
-/******/ return module.exports;
-/******/ }
-/******/ require.e = function requireEnsure(chunkId, callback) {
-/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
-/******/ if(installedChunks[chunkId] !== undefined)
-/******/ installedChunks[chunkId].push(callback);
-/******/ else {