Don't use uglify compress

v1.18.x
Peter Jaszkowiak 8 years ago
parent 53eced6be0
commit 9ef2b5a003

@ -206,6 +206,7 @@ function minifyJS_batch(data, callback) {
url: filename + '.map', url: filename + '.map',
includeSources: true, includeSources: true,
}, },
compress: false,
}); });
async.parallel([ async.parallel([
@ -257,9 +258,7 @@ function minifyJS(data, callback) {
url: data.filename + '.map', url: data.filename + '.map',
includeSources: true, includeSources: true,
}, },
compress: { compress: false,
hoist_funs: false,
},
}); });
async.parallel([ async.parallel([

@ -70,7 +70,7 @@ describe('minifier', function () {
assert.strictEqual( assert.strictEqual(
fs.readFileSync(destPath).toString(), fs.readFileSync(destPath).toString(),
'!function(n,o){n.doStuff=function(){o.body.innerHTML="Stuff has been done"}}(window,document);function foo(n,o){return\'The person known as "\'+n+\'" is \'+o+" years old"}' + '(function(n,o){n.doStuff=function(){o.body.innerHTML="Stuff has been done"}})(window,document);function foo(n,o){return\'The person known as "\'+n+\'" is \'+o+" years old"}' +
'\n//# sourceMappingURL=minified.js.map' '\n//# sourceMappingURL=minified.js.map'
); );
done(); done();
@ -88,7 +88,7 @@ describe('minifier', function () {
assert.ifError(err); assert.ifError(err);
assert.strictEqual( assert.strictEqual(
buffer.toString(), buffer.toString(),
'!function(n,o){n.doStuff=function(){o.body.innerHTML="Stuff has been done"}}(window,document);' + '(function(n,o){n.doStuff=function(){o.body.innerHTML="Stuff has been done"}})(window,document);' +
'\n//# sourceMappingURL=1.js.map' '\n//# sourceMappingURL=1.js.map'
); );
done(); done();

Loading…
Cancel
Save