diff options
Diffstat (limited to 'bin/uglifyjs2')
-rwxr-xr-x | bin/uglifyjs2 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/uglifyjs2 b/bin/uglifyjs2 index b3b00a7b..8515586a 100755 --- a/bin/uglifyjs2 +++ b/bin/uglifyjs2 @@ -78,6 +78,14 @@ You need to pass an argument to this option to specify the name that your module .argv ; +normalize(ARGS); + +if (ARGS.ast_help) { + var desc = UglifyJS.describe_ast(); + sys.puts(typeof desc == "string" ? desc : JSON.stringify(desc, null, 2)); + process.exit(0); +} + if (ARGS.h || ARGS.help) { sys.puts(optimist.help()); process.exit(0); @@ -87,8 +95,6 @@ if (ARGS.acorn) { acorn = require("acorn"); } -normalize(ARGS); - var COMPRESS = getOptions("c"); var MANGLE = getOptions("m"); var BEAUTIFY = getOptions("b"); |