Class: Nanoc::Filters::YUICompressor Private

Inherits:
Nanoc::Filter
  • Object
show all
Defined in:
lib/nanoc/filters/yui_compressor.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#run(content, params = {}) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Compress Javascript or CSS using [YUICompressor](rubydoc.info/gems/yuicompressor). This method optionally takes options to pass directly to the YUICompressor gem.

Parameters:

  • content (String)

    JavaScript or CSS input

  • params (Hash) (defaults to: {})

    Options passed to YUICompressor

Returns:

  • (String)

    Compressed but equivalent JavaScript or CSS



19
20
21
# File 'lib/nanoc/filters/yui_compressor.rb', line 19

def run(content, params = {})
  ::YUICompressor.compress(content, params)
end