--export-all Only used when --wrap, this tells UglifyJS to add code to
automatically export all globals. [boolean]
-v, --verbose Verbose [boolean]
+ -V, --version Print version number and exits. [boolean]
Specify `--output` (`-o`) to declare the output file. Otherwise the output
goes to STDOUT.
.describe("export-all", "Only used when --wrap, this tells UglifyJS to add code to automatically export all globals.")
.describe("lint", "Display some scope warnings")
.describe("v", "Verbose")
+ .describe("V", "Print version number and exit.")
.alias("p", "prefix")
.alias("o", "output")
.alias("c", "compress")
.alias("d", "define")
.alias("r", "reserved")
+ .alias("V", "version")
.string("source-map")
.string("source-map-root")
normalize(ARGS);
+if (ARGS.version || ARGS.V) {
+ var json = require("../package.json");
+ sys.puts(json.name + ' ' + json.version);
+ process.exit(0);
+}
+
if (ARGS.ast_help) {
var desc = UglifyJS.describe_ast();
sys.puts(typeof desc == "string" ? desc : JSON.stringify(desc, null, 2));