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.2.0b1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.5 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.4 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.3 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.2 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.0 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.0rc2 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.0rc1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.0b1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.1.0a1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.0.2 lib/nanoc/filters/yui_compressor.rb
nanoc-4.0.1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.0.0 lib/nanoc/filters/yui_compressor.rb
nanoc-4.0.0rc3 lib/nanoc/filters/yui_compressor.rb
nanoc-4.0.0rc2 lib/nanoc/filters/yui_compressor.rb
nanoc-4.0.0rc1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.0.0b4 lib/nanoc/filters/yui_compressor.rb
nanoc-4.0.0b3 lib/nanoc/filters/yui_compressor.rb