Sha256: 222c8bd2449989e4145f6d8e3acf870bee552c868df64e1a352cab829ea780b7

Contents?: true

Size: 656 Bytes

Versions: 90

Compression:

Stored size: 656 Bytes

Contents

# frozen_string_literal: true

module Nanoc::Filters
  # @api private
  class YUICompressor < Nanoc::Filter
    identifier :yui_compressor

    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

90 entries across 90 versions & 1 rubygems

Version Path
nanoc-4.9.4 lib/nanoc/filters/yui_compressor.rb
nanoc-4.9.3 lib/nanoc/filters/yui_compressor.rb
nanoc-4.9.2 lib/nanoc/filters/yui_compressor.rb
nanoc-4.9.1 lib/nanoc/filters/yui_compressor.rb
nanoc-4.9.0 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.19 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.18 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.17 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.16 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.15 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.14 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.13 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.12 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.11 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.10 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.9 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.8 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.7 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.6 lib/nanoc/filters/yui_compressor.rb
nanoc-4.8.5 lib/nanoc/filters/yui_compressor.rb