diff --git a/README.md b/README.md index 767a7848..edafaa9c 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ The available options are: `//# sourceMappingURL`. --stats Display operations run time on STDERR. --toplevel Compress and/or mangle variables in toplevel scope. + --verbose Print informational/diagnostic messages. --wrap Embed everything in a big function, making the “exports” and “global” variables available. You need to pass an argument to this option to @@ -126,7 +127,6 @@ TODOs: parsed, but the source map will adjust for its presence. --lint Display some scope warnings - -v, --verbose Verbose --reserved-file File containing reserved names --reserve-domprops Make (most?) DOM properties reserved for --mangle-props diff --git a/bin/uglifyjs b/bin/uglifyjs index 360461ed..b154c3eb 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -32,6 +32,7 @@ program.option("--self", "Build UglifyJS2 as a library (implies --wrap UglifyJS) program.option("--source-map [options]", "Enable source map/specify source map options.", parseSourceMap()); program.option("--stats", "Display operations run time on STDERR.") program.option("--toplevel", "Compress and/or mangle variables in toplevel scope."); +program.option("--verbose", "Print informational/diagnostic messages."); program.option("--wrap ", "Embed everything as a function with “exports” corresponding to “name” globally."); program.arguments("[files...]").parseArgv(process.argv); if (program.configFile) { @@ -79,6 +80,10 @@ if (program.parse) { options.parse = program.parse; } } +if (program.verbose && options.compress) { + if (typeof options.compress != "object") options.compress = {}; + options.compress.warnings = "verbose"; +} if (program.self) { if (program.args.length) { console.error("WARN: Ignoring input files since --self was passed");