Class: Stylo::PipelineSteps::JavascriptMinifying

Inherits:
Object
  • Object
show all
Defined in:
lib/stylo/pipeline_steps/javascript_minifying.rb

Instance Method Summary collapse

Instance Method Details

#call(response) ⇒ Object



4
5
6
7
8
# File 'lib/stylo/pipeline_steps/javascript_minifying.rb', line 4

def call(response)
  if Config.options[:js_minifying_enabled] and response.extension == '.js' and response.has_content?
    response.set_body(JSMin.new(response.body).minify, :javascript)
  end
end