From: Jake Archibald Date: Tue, 8 Jan 2013 20:33:58 +0000 (-0800) Subject: Compressor options use underscores rather than hyphens X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1d8871a092027988e386e4f0cf5a3b1057ade38d;p=UglifyJS.git Compressor options use underscores rather than hyphens --- diff --git a/README.md b/README.md index 802ea1c1..bb8521b2 100644 --- a/README.md +++ b/README.md @@ -158,8 +158,8 @@ the available options (all are `true` by default, except `hoist_vars`): - `sequences` -- join consecutive simple statements using the comma operator - `properties` -- rewrite property access using the dot notation, for example `foo["bar"] → foo.bar` -- `dead-code` -- remove unreachable code -- `drop-debugger` -- remove `debugger;` statements +- `dead_code` -- remove unreachable code +- `drop_debugger` -- remove `debugger;` statements - `unsafe` -- apply "unsafe" transformations (discussion below) - `conditionals` -- apply optimizations for `if`-s and conditional expressions @@ -172,11 +172,11 @@ the available options (all are `true` by default, except `hoist_vars`): - `loops` -- optimizations for `do`, `while` and `for` loops when we can statically determine the condition - `unused` -- drop unreferenced functions and variables -- `hoist-funs` -- hoist function declarations -- `hoist-vars` -- hoist `var` declarations (this is `false` by default +- `hoist_funs` -- hoist function declarations +- `hoist_vars` -- hoist `var` declarations (this is `false` by default because it seems to increase the size of the output in general) -- `if-return` -- optimizations for if/return and if/continue -- `join-vars` -- join consecutive `var` statements +- `if_return` -- optimizations for if/return and if/continue +- `join_vars` -- join consecutive `var` statements - `cascade` -- small optimization for sequences, transform `x, x` into `x` and `x = something(), x` into `x = something()` - `warnings` -- display warnings when dropping unreachable code or unused