Sha256: 5e6c04b0b0c6e837c7d27559bd307c518571b82875e4522eab95b63cb8f5d781

Contents?: true

Size: 592 Bytes

Versions: 15

Compression:

Stored size: 592 Bytes

Contents

require 'yuicompressor'

module Nanoc::Filters

  # @since 3.3.0
  class YUICompressor < Nanoc::Filter

    # 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

15 entries across 15 versions & 1 rubygems

Version Path
nanoc-3.5.0 lib/nanoc/filters/yui_compressor.rb
nanoc-3.5.0b2 lib/nanoc/filters/yui_compressor.rb
nanoc-3.5.0b1 lib/nanoc/filters/yui_compressor.rb
nanoc-3.4.3 lib/nanoc/filters/yui_compressor.rb
nanoc-3.4.2 lib/nanoc/filters/yui_compressor.rb
nanoc-3.4.1 lib/nanoc/filters/yui_compressor.rb
nanoc-3.4.0 lib/nanoc/filters/yui_compressor.rb
nanoc-3.3.7 lib/nanoc/filters/yui_compressor.rb
nanoc-3.3.6 lib/nanoc/filters/yui_compressor.rb
nanoc-3.3.5 lib/nanoc/filters/yui_compressor.rb
nanoc-3.3.4 lib/nanoc/filters/yui_compressor.rb
nanoc-3.3.3 lib/nanoc/filters/yui_compressor.rb
nanoc-3.3.2 lib/nanoc/filters/yui_compressor.rb
nanoc-3.3.1 lib/nanoc/filters/yui_compressor.rb
nanoc-3.3.0 lib/nanoc/filters/yui_compressor.rb