Skip to content

Commit 01cbeae

Browse files
committed
beautify and do tests first
1 parent 46b12b2 commit 01cbeae

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

lib/ProgressPlugin.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ ProgressPlugin.prototype.apply = function(compiler) {
2222
compiler.compilers.forEach(function(compiler, idx) {
2323
compiler.apply(new ProgressPlugin(function(p, msg) {
2424
states[idx] = Array.prototype.slice.apply(arguments);
25-
handler.apply(null, [states.map(function(state) {
26-
return state && state[0] || 0;
27-
}).reduce(function(a, b) {
28-
return a + b;
29-
}) / states.length, "[" + idx + "] " + msg]
30-
.concat(Array.prototype.slice.call(arguments, 2)));
25+
handler.apply(null, [
26+
states.map(function(state) {
27+
return state && state[0] || 0;
28+
}).reduce(function(a, b) {
29+
return a + b;
30+
}) / states.length,
31+
"[" + idx + "] " + msg
32+
].concat(Array.prototype.slice.call(arguments, 2)));
3133
}));
3234
});
3335
} else {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"lint": "eslint lib bin hot",
8686
"beautify-lint": "beautify-lint lib/**.js hot/**.js bin/**.js benchmark/*.js test/*.js",
8787
"beautify": "beautify-rewrite lib/**.js hot/**.js bin/**.js benchmark/*.js test/*.js",
88-
"precover": "npm run lint && npm run beautify-lint",
88+
"postcover": "npm run lint && npm run beautify-lint",
8989
"cover": "istanbul cover -x *.runtime.js node_modules/mocha/bin/_mocha",
9090
"publish-patch": "npm run lint && npm run beautify-lint && mocha && npm version patch && git push && git push --tags && npm publish"
9191
}

0 commit comments

Comments
 (0)