webpack 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,9 +15,9 @@ FunctionModuleTemplatePlugin.prototype.apply = function(moduleTemplate) {
|
|
15
15
|
if((module.arguments && module.arguments.length !== 0) || module.hasDependencies()) {
|
16
16
|
defaultArguments.push("__webpack_require__");
|
17
17
|
}
|
18
|
-
source.add("/***/ function(" + defaultArguments.concat(module.arguments || []).join(", ") + ") {\n\n");
|
18
|
+
source.add("/***/ (function(" + defaultArguments.concat(module.arguments || []).join(", ") + ") {\n\n");
|
19
19
|
source.add(new PrefixSource(this.outputOptions.sourcePrefix, moduleSource));
|
20
|
-
source.add("\n\n/***/ }");
|
20
|
+
source.add("\n\n/***/ })");
|
21
21
|
return source;
|
22
22
|
});
|
23
23
|
moduleTemplate.plugin("package", function(moduleSource, module) {
|
@@ -105,7 +105,11 @@ JsonpMainTemplatePlugin.prototype.apply = function(mainTemplate) {
|
|
105
105
|
]),
|
106
106
|
"}",
|
107
107
|
"for(moduleId in moreModules) {",
|
108
|
-
this.indent(
|
108
|
+
this.indent([
|
109
|
+
"if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {",
|
110
|
+
this.indent(this.renderAddModule(hash, chunk, "moduleId", "moreModules[moduleId]")),
|
111
|
+
"}"
|
112
|
+
]),
|
109
113
|
"}",
|
110
114
|
"if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);",
|
111
115
|
"while(callbacks.length)",
|
@@ -88,7 +88,7 @@ UglifyJsPlugin.prototype.apply = function(compiler) {
|
|
88
88
|
ast = ast.transform(compress);
|
89
89
|
}
|
90
90
|
if(options.mangle !== false) {
|
91
|
-
ast.figure_out_scope();
|
91
|
+
ast.figure_out_scope(options.mangle || {});
|
92
92
|
ast.compute_char_frequency(options.mangle || {});
|
93
93
|
ast.mangle_names(options.mangle || {});
|
94
94
|
if(options.mangle && options.mangle.props) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.15.0",
|
4
4
|
"author": "Tobias Koppers @sokra",
|
5
5
|
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.",
|
6
6
|
"dependencies": {
|
@@ -38,15 +38,15 @@
|
|
38
38
|
"file-loader": "~0.8.0",
|
39
39
|
"glob": "^5.0.14",
|
40
40
|
"i18n-webpack-plugin": "~0.2.0",
|
41
|
-
"istanbul": "^0.
|
41
|
+
"istanbul": "^0.4.5",
|
42
42
|
"jade": "^1.11.0",
|
43
43
|
"jade-loader": "~0.7.0",
|
44
44
|
"js-beautify": "^1.5.10",
|
45
45
|
"json-loader": "~0.5.1",
|
46
46
|
"less": "^2.5.1",
|
47
47
|
"less-loader": "^2.0.0",
|
48
|
-
"mocha": "
|
49
|
-
"mocha-lcov-reporter": "0.0
|
48
|
+
"mocha": "^3.2.0",
|
49
|
+
"mocha-lcov-reporter": "^1.0.0",
|
50
50
|
"raw-loader": "~0.5.0",
|
51
51
|
"script-loader": "~0.6.0",
|
52
52
|
"should": "^7.0.2",
|
@@ -78,12 +78,15 @@
|
|
78
78
|
"scripts": {
|
79
79
|
"pretest": "npm run lint && npm run beautify-lint",
|
80
80
|
"test": "mocha",
|
81
|
-
"travis": "npm run cover
|
81
|
+
"travis:test": "npm run cover:min",
|
82
|
+
"travis:lint": "npm run lint && npm run beautify-lint",
|
83
|
+
"appveyor:test": "node --max_old_space_size=4096 node_modules\\mocha\\bin\\mocha --harmony test/*.test.js",
|
82
84
|
"lint": "eslint lib bin hot scripts",
|
83
85
|
"beautify-lint": "node ./scripts/beautify-check",
|
84
86
|
"beautify": "node ./scripts/beautify-rewrite",
|
85
87
|
"precover": "npm run lint && npm run beautify-lint",
|
86
|
-
"cover": "istanbul cover -x **/*.runtime.js node_modules/mocha/bin/_mocha",
|
88
|
+
"cover": "node ./node_modules/istanbul/lib/cli.js cover -x '**/*.runtime.js' node_modules/mocha/bin/_mocha -- test/*.test.js",
|
89
|
+
"cover:min": "node ./node_modules/istanbul/lib/cli.js cover -x '**/*.runtime.js' --report lcovonly node_modules/mocha/bin/_mocha -- test/*.test.js",
|
87
90
|
"publish-patch": "npm run lint && npm run beautify-lint && mocha && npm version patch && git push && git push --tags && npm publish"
|
88
91
|
}
|
89
92
|
}
|