aboutsummaryrefslogtreecommitdiff
path: root/bin/uglifyjs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/uglifyjs')
-rwxr-xr-xbin/uglifyjs12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs
index 158dc571..b9406e1c 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -25,6 +25,18 @@ program.version(info.name + ' ' + info.version);
program.parseArgv = program.parse;
program.parse = undefined;
if (process.argv.indexOf("ast") >= 0) program.helpInformation = UglifyJS.describe_ast;
+else if (process.argv.indexOf("options") >= 0) program.helpInformation = function() {
+ var text = [];
+ var options = UglifyJS.default_options();
+ for (var option in options) {
+ text.push("--" + (option == "output" ? "beautify" : option == "sourceMap" ? "source-map" : option) + " options:");
+ Object.keys(options[option]).forEach(function(name) {
+ text.push(" " + name);
+ });
+ text.push("");
+ }
+ return text.join("\n");
+};
program.option("-p, --parse <options>", "Specify parser options.", parse_js("parse", true));
program.option("-c, --compress [options]", "Enable compressor/specify compressor options.", parse_js("compress", true));
program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js("mangle", true));