invert `reduce_vars` tracking flag (#1519)
authorAlex Lam S.L <alexlamsl@gmail.com>
Tue, 28 Feb 2017 20:12:10 +0000 (04:12 +0800)
committerGitHub <noreply@github.com>
Tue, 28 Feb 2017 20:12:10 +0000 (04:12 +0800)
commitf5cbe19b753bf84f8b11f96e2c91a8ca49525dba
tree75569231e92b9d72baab77ed81961b415e13e1e7
parentb34fa11a13221b7ad26ea48f18fcf2f5903c94c1
invert `reduce_vars` tracking flag (#1519)

Modules like webpack and grunt-contrib-uglify still uses `ast.transform(compressor)` before `Compressor.compress(ast)` was introduced.

Workaround this compatibility issue by deactivating `reduce_vars` in such case.

Also fix use case with omitted `options` when calling `Compressor()`.

fixes #1516
README.md
lib/compress.js
test/mocha/minify.js