diff options
author | Mihai Bazon <mihai@bazon.net> | 2013-03-02 14:28:34 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2013-03-02 14:28:34 +0200 |
commit | 26746ce3167a768479435588dd9099bb7408018f (patch) | |
tree | ed018330d175f1c5c6f9d0d761209616187cb691 /bin | |
parent | dac6efb43d7112f697b863fc6783e6324e0aa4c0 (diff) | |
download | tracifyjs-26746ce3167a768479435588dd9099bb7408018f.tar.gz tracifyjs-26746ce3167a768479435588dd9099bb7408018f.zip |
Add `--screw-ie` option
For now the implication is that UglifyJS will not leak a function
expression's name in the surrounding scope (IE < 9 does that).
(ref. mishoo/UglifyJS#485)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/uglifyjs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs index dc9a4512..9d2eedcb 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -21,6 +21,7 @@ mangling you need to use `-c` and `-m`.\ .describe("source-map-root", "The path to the original source to be included in the source map.") .describe("source-map-url", "The path to the source map to be added in //@ sourceMappingURL. Defaults to the value passed with --source-map.") .describe("in-source-map", "Input source map, useful if you're compressing JS that was generated from some other original code.") + .describe("screw-ie", "Pass this flag if you don't care about full compliance with Internet Explorer quirks (by default UglifyJS will try to be IE-proof).") .describe("p", "Skip prefix for original filenames that appear in source maps. \ For example -p 3 will drop 3 directories from file names and ensure they are relative paths.") .describe("o", "Output file (default STDOUT).") @@ -71,6 +72,7 @@ You need to pass an argument to this option to specify the name that your module .string("d") .string("comments") .string("wrap") + .boolean("screw-ie") .boolean("export-all") .boolean("self") .boolean("v") @@ -246,7 +248,7 @@ var SCOPE_IS_NEEDED = COMPRESS || MANGLE || ARGS.lint; if (SCOPE_IS_NEEDED) { time_it("scope", function(){ - TOPLEVEL.figure_out_scope(); + TOPLEVEL.figure_out_scope({ screw_ie: ARGS.screw_ie }); if (ARGS.lint) { TOPLEVEL.scope_warnings(); } @@ -261,7 +263,7 @@ if (COMPRESS) { if (SCOPE_IS_NEEDED) { time_it("scope", function(){ - TOPLEVEL.figure_out_scope(); + TOPLEVEL.figure_out_scope({ screw_ie: ARGS.screw_ie }); if (MANGLE) { TOPLEVEL.compute_char_frequency(MANGLE); } |