lib/jekyll-minifier.rb in jekyll-minifier-0.1.8 vs lib/jekyll-minifier.rb in jekyll-minifier-0.1.9

- old
+ new

@@ -37,11 +37,11 @@ opts = @site.config['jekyll-minifier'] if ( !opts.nil? ) # Javascript Arguments js_args += opts[:uglifier_args] if opts.has_key?(:uglifier_args) - + # HTML Arguments html_args[:remove_spaces_inside_tags] = opts['remove_spaces_inside_tags'] if opts.has_key?('remove_spaces_inside_tags') html_args[:remove_multi_spaces] = opts['remove_multi_spaces'] if opts.has_key?('remove_multi_spaces') html_args[:remove_comments] = opts['remove_comments'] if opts.has_key?('remove_comments') html_args[:remove_intertag_spaces] = opts['remove_intertag_spaces'] if opts.has_key?('remove_intertag_spaces') @@ -61,11 +61,11 @@ html_args[:simple_boolean_attributes] = opts['simple_boolean_attributes'] if opts.has_key?('simple_boolean_attributes') html_args[:compress_js_templates] = opts['compress_js_templates'] if opts.has_key?('compress_js_templates') html_args[:preserve_patterns] += [/<\?php.*?\?>/im] if opts['preserve_php'] == true html_args[:preserve_patterns] += opts[:preserve_patterns].map { |pattern| Regexp.new(pattern)} if opts.has_key?(:preserve_patterns) end - + html_args[:css_compressor] = CSSminify2.new() if ( !js_args.nil? ) html_args[:javascript_compressor] = Uglifier.new(js_args) else @@ -93,10 +93,10 @@ compressor = Uglifier.new(js_args) else compressor = Uglifier.new() end - output_file(path, compressed.compile(content)) + output_file(path, compressor.compile(content)) else output_file(path, content) end else output_file(path, content)