diff options
author | Mihai Bazon <mihai.bazon@gmail.com> | 2013-04-21 01:30:02 -0700 |
---|---|---|
committer | Mihai Bazon <mihai.bazon@gmail.com> | 2013-04-21 01:30:02 -0700 |
commit | 753b4b6cc8aff37b9678b3bc3a883874bf4cac51 (patch) | |
tree | c0ec1197c2d52441ce83c61be4df4383403e305e /bin/uglifyjs | |
parent | a9c1b9f1385464309247fb2dd299ba6bb90bce10 (diff) | |
parent | 5af144522a6fea302abdd0b63d48864de0664207 (diff) | |
download | tracifyjs-753b4b6cc8aff37b9678b3bc3a883874bf4cac51.tar.gz tracifyjs-753b4b6cc8aff37b9678b3bc3a883874bf4cac51.zip |
Merge pull request #191 from michaelficarra/use-es5-member-access-with-screw-ie
use dotted member access when --screw-ie8 option given
Diffstat (limited to 'bin/uglifyjs')
-rwxr-xr-x | bin/uglifyjs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs index f20976d4..aecc0726 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -114,20 +114,21 @@ if (ARGS.acorn) { acorn = require("acorn"); } -var COMPRESS = getOptions("c", true); -var MANGLE = getOptions("m", true); +var COMPRESS = getOptions("c", true) || {}; +var MANGLE = getOptions("m", true) || {}; var BEAUTIFY = getOptions("b", true); -if (COMPRESS && ARGS.d) { +if (ARGS.d) { COMPRESS.global_defs = getOptions("d"); } -if (MANGLE && ARGS.r) { - MANGLE.except = ARGS.r.replace(/^\s+|\s+$/g).split(/\s*,+\s*/); +if (ARGS.screw_ie8) { + COMPRESS.screw_ie8 = true; + MANGLE.screw_ie8 = true; } -if (MANGLE && ARGS.screw_ie8) { - MANGLE.screw_ie8 = true; +if (ARGS.r) { + MANGLE.except = ARGS.r.replace(/^\s+|\s+$/g).split(/\s*,+\s*/); } var OUTPUT_OPTIONS = { |