lib/uglifier.rb in uglifier-2.1.2 vs lib/uglifier.rb in uglifier-2.2.0

- old
+ new

@@ -41,11 +41,12 @@ :unused => true, # Drop unreferenced functions and variables :hoist_funs => true, # Hoist function declarations :hoist_vars => false, # Hoist var declarations :if_return => true, # Optimizations for if/return and if/continue :join_vars => true, # Join consecutive var statements - :cascade => true # Cascade sequences + :cascade => true, # Cascade sequences + :negate_iife => true # Negate immediately invoke function expressions }, # Apply transformations to code, set to false to skip :define => {}, # Define values for symbol replacement :enclose => false, # Enclose in output function wrapper, define replacements as key-value pairs :source_filename => nil, # The filename of the input file :source_root => nil, # The URL of the directory which contains :source_filename @@ -184,13 +185,11 @@ :enclose => enclose_options )) end def mangle_options - conditional_option(@options[:mangle], DEFAULTS[:mangle].merge( - :screw_ie8 => @options[:screw_ie8] || DEFAULTS[:screw_ie8] - )) + conditional_option(@options[:mangle], DEFAULTS[:mangle]) end def compressor_options defaults = conditional_option(DEFAULTS[:compress], :global_defs => @options[:define] || {}, @@ -224,10 +223,12 @@ end end def output_options DEFAULTS[:output].merge(@options[:output] || {}).merge( - :comments => comment_options) + :comments => comment_options, + :screw_ie8 => @options[:screw_ie8] || !@options[:ie_proof] || DEFAULTS[:screw_ie8] + ).reject! { |key,value| key == :ie_proof} end def source_map_options { :file => @options[:output_filename],