Create and map bare-returns into new parse property name

This commit is contained in:
Martii
2016-02-06 12:46:18 -07:00
committed by Richard van Velzen
parent a123e232b9
commit cdba43cfa4
2 changed files with 14 additions and 3 deletions

View File

@@ -42,7 +42,8 @@ exports.minify = function(files, options) {
mangleProperties : false,
nameCache : null,
output : null,
compress : {}
compress : {},
parse : {}
});
UglifyJS.base54.reset();
@@ -62,7 +63,8 @@ exports.minify = function(files, options) {
sourcesContent[file] = code;
toplevel = UglifyJS.parse(code, {
filename: options.fromString ? i : file,
toplevel: toplevel
toplevel: toplevel,
bare_returns: options.parse ? options.parse.bare_returns : undefined
});
});
}