class Nanoc::Filters::UglifyJS

@api private

Public Instance Methods

run(content, params = {}) click to toggle source

Runs the content through [UglifyJS](github.com/mishoo/UglifyJS2/). This method optionally takes options to pass directly to Uglifier.

@param [String] content The content to filter

@option params [Array] :options ([]) A list of options to pass on to Uglifier

@return [String] The filtered content

# File lib/nanoc/filters/uglify_js.rb, line 14
def run(content, params = {})
  # Add filename to load path
  Uglifier.new(params).compile(content)
end