```
-h, --help Print usage information.
+ `--help options` for details on available options.
-V, --version Print version number.
-p, --parse <options> Specify parser options:
`acorn` Use Acorn for parsing.
### Mangle properties options
-- `reserved` (default: `[]`) -- Do not mangle property names listed in the
+- `reserved` (default: `[]`) -- Do not mangle property names listed in the
`reserved` array.
- `regex` (default: `null`) -— Pass a RegExp literal to only mangle property
names matching the regular expression.
- `keep_quoted` (default: `false`) -— Only mangle unquoted property names.
- `debug` (default: `false`) -— Mangle names with the original name still present.
Pass an empty string `""` to enable, or a non-empty string to set the debug suffix.
-- `builtins` (default: `false`) -- Use `true` to allow the mangling of builtin
+- `builtins` (default: `false`) -- Use `true` to allow the mangling of builtin
DOM properties. Not recommended to override this setting.
## Output options
compress: false,
mangle: false
};
-program.version(info.name + ' ' + info.version);
+program.version(info.name + " " + info.version);
program.parseArgv = program.parse;
program.parse = undefined;
if (process.argv.indexOf("ast") >= 0) program.helpInformation = UglifyJS.describe_ast;
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);
+ var defs = options[option];
+ var padding = "";
+ Object.keys(defs).map(function(name) {
+ if (padding.length < name.length) padding = Array(name.length + 1).join(" ");
+ return [ name, JSON.stringify(defs[name]) ];
+ }).forEach(function(tokens) {
+ text.push(" " + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]);
});
text.push("");
}