Sha256: 2bbed167d102e45f5f4d32dbab17d875e644041f6ae99639aba813afd5286f19

Contents?: true

Size: 614 Bytes

Versions: 39

Compression:

Stored size: 614 Bytes

Contents

module Nanoc::Filters
  # @since 3.3.0
  #
  # @api private
  class YUICompressor < Nanoc::Filter
    requires 'yuicompressor'

    # Compress Javascript or CSS using [YUICompressor](http://rubydoc.info/gems/yuicompressor).
    # This method optionally takes options to pass directly to the
    # YUICompressor gem.
    #
    # @param [String] content JavaScript or CSS input
    #
    # @param [Hash] params Options passed to YUICompressor
    #
    # @return [String] Compressed but equivalent JavaScript or CSS
    def run(content, params = {})
      ::YUICompressor.compress(content, params)
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
nanoc-4.4.4 lib/nanoc/filters/yui_compressor.rb
nanoc-4.4.3 lib/nanoc/filters/yui_compressor.rb
nanoc-4.4.2 lib/nanoc/filters/yui_compressor.rb
nanoc-4.4.1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.4.0 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.8 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.7 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.6 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.5 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.4 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.3 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.2 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.3.0 lib/nanoc/filters/yui_compressor.rb
nanoc-4.2.4 lib/nanoc/filters/yui_compressor.rb
nanoc-4.2.3 lib/nanoc/filters/yui_compressor.rb
nanoc-4.2.2 lib/nanoc/filters/yui_compressor.rb
nanoc-4.2.1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.2.0 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.6 lib/nanoc/filters/yui_compressor.rb