Sha256: 0724d03ffc48bf06c153310a1d417304f9b8d552087fc794c7fdc3bae9035c46

Contents?: true

Size: 616 Bytes

Versions: 9

Compression:

Stored size: 616 Bytes

Contents

# encoding: utf-8

module Nanoc::Filters

  # @since 3.3.0
  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

9 entries across 9 versions & 1 rubygems

Version Path
nanoc-3.7.4 lib/nanoc/filters/yui_compressor.rb
nanoc-3.7.3 lib/nanoc/filters/yui_compressor.rb
nanoc-3.7.2 lib/nanoc/filters/yui_compressor.rb
nanoc-3.7.1 lib/nanoc/filters/yui_compressor.rb
nanoc-3.7.0 lib/nanoc/filters/yui_compressor.rb
nanoc-3.6.11 lib/nanoc/filters/yui_compressor.rb
nanoc-3.6.10 lib/nanoc/filters/yui_compressor.rb
nanoc-3.6.9 lib/nanoc/filters/yui_compressor.rb
nanoc-3.6.8 lib/nanoc/filters/yui_compressor.rb