add warnings as toplevel shorthand
This commit is contained in:
parent
e6368b61a6
commit
0792c77564
|
|
@ -97,9 +97,8 @@ if (program.sourceMap && "base" in program.sourceMap) {
|
||||||
};
|
};
|
||||||
}();
|
}();
|
||||||
}
|
}
|
||||||
if (program.verbose && options.compress) {
|
if (program.verbose) {
|
||||||
if (typeof options.compress != "object") options.compress = {};
|
options.warnings = "verbose";
|
||||||
options.compress.warnings = "verbose";
|
|
||||||
}
|
}
|
||||||
if (program.self) {
|
if (program.self) {
|
||||||
if (program.args.length) {
|
if (program.args.length) {
|
||||||
|
|
|
||||||
|
|
@ -42,11 +42,13 @@ function minify(files, options) {
|
||||||
parse: {},
|
parse: {},
|
||||||
sourceMap: false,
|
sourceMap: false,
|
||||||
toplevel: false,
|
toplevel: false,
|
||||||
|
warnings: true,
|
||||||
wrap: false,
|
wrap: false,
|
||||||
}, true);
|
}, true);
|
||||||
set_shorthand("ie8", options, [ "compress", "mangle", "output" ]);
|
set_shorthand("ie8", options, [ "compress", "mangle", "output" ]);
|
||||||
set_shorthand("keep_fnames", options, [ "compress", "mangle" ]);
|
set_shorthand("keep_fnames", options, [ "compress", "mangle" ]);
|
||||||
set_shorthand("toplevel", options, [ "compress", "mangle" ]);
|
set_shorthand("toplevel", options, [ "compress", "mangle" ]);
|
||||||
|
set_shorthand("warnings", options, [ "compress" ]);
|
||||||
if (options.mangle) {
|
if (options.mangle) {
|
||||||
options.mangle = defaults(options.mangle, {
|
options.mangle = defaults(options.mangle, {
|
||||||
cache: null,
|
cache: null,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user