Skip to content

Commit 376d079

Browse files
committed
update lib to support ES5 polyfills.
1 parent 90a982a commit 376d079

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

index.js

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
var exec = require('child_process').exec;
22

3-
Object.assign = function (target) {
4-
'use strict';
5-
if (target === undefined || target === null) {
6-
throw new TypeError('Cannot convert undefined or null to object');
7-
}
8-
9-
var output = Object(target);
10-
for (var index = 1; index < arguments.length; index++) {
11-
var source = arguments[index];
12-
if (source !== undefined && source !== null) {
13-
for (var nextKey in source) {
14-
if (source.hasOwnProperty(nextKey)) {
15-
output[nextKey] = source[nextKey];
16-
}
17-
}
18-
}
19-
}
20-
return output;
21-
};
22-
233
function puts(error, stdout, stderr) {
244
console.log(stdout);
255
}
@@ -29,7 +9,15 @@ function WebpackShellPlugin(options) {
299
onBuildStart: [],
3010
onBuildEnd: []
3111
};
32-
this.options = Object.assign(defaultOptions, options);
12+
if (!options.onBuildStart) {
13+
options.onBuildStart = defaultOptions.onBuildStart;
14+
}
15+
16+
if(!options.onBuildEnd) {
17+
options.onBuildEnd = defaultOptions.onBuildEnd;
18+
}
19+
20+
this.options = options;
3321

3422
}
3523

0 commit comments

Comments
 (0)