mirror of https://github.com/curbengh/hexo-yam
Don't parse irrelevent options to uglifyjs
This commit is contained in:
parent
7b03521154
commit
0022702822
|
@ -78,10 +78,11 @@ function logic_js(str, data) {
|
|||
}
|
||||
}
|
||||
|
||||
//uglifyjs doesn't like 'enable' option
|
||||
//uglifyjs doesn't like irrelevant options
|
||||
delete options.enable
|
||||
delete options.logger
|
||||
delete options.exclude
|
||||
var result = UglifyJS.minify(str, options);
|
||||
console.log(result.error);
|
||||
var saved = ((str.length - result.code.length) / str.length * 100).toFixed(2);
|
||||
if (options.logger) {
|
||||
var log = hexo.log || console.log;
|
||||
|
|
Loading…
Reference in New Issue