add --pure-funcs option

it has the same effect as specifying `pure_funcs` in `--compressor`
option, however it's much easier to use

instead of:

    --compressor 'pure_func=["Math.floor","debug","console.logTime"]'

it's now possible:

    --compressor --pure-funcs Math.floor debug console.logTime

fixes #684
This commit is contained in:
Damian Krzeminski
2015-10-13 21:05:37 -04:00
parent eac67b2816
commit d5138f7467
2 changed files with 8 additions and 0 deletions

View File

@@ -134,6 +134,8 @@ The available options are:
--mangle-props Mangle property names
--mangle-regex Only mangle property names matching the regex
--name-cache File to hold mangled names mappings
--pure-funcs List of functions that can be safely removed if
their return value is not used [array]
```
Specify `--output` (`-o`) to declare the output file. Otherwise the output