Class: Assette::PostProcessor::JSMin

Inherits:
Object
  • Object
show all
Defined in:
lib/assette/post_processors/js_min.rb

Instance Method Summary collapse

Instance Method Details

#minify?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/assette/post_processors/js_min.rb', line 35

def minify?
  @args[:parent].minify? if @args[:parent]
end

#processorObject



39
40
41
# File 'lib/assette/post_processors/js_min.rb', line 39

def processor
  Uglifier.compile(@str, Assette.config.uglifier)
end

#should_process?Boolean

Returns:

  • (Boolean)


30
31
32
33
# File 'lib/assette/post_processors/js_min.rb', line 30

def should_process?
  Assette.logger.debug("Testing post processor #{self.class}") {"Assette.config.compiling?: #{Assette.config.compiling?} Assette.config.minifying?: #{Assette.config.minifying?} minify?: #{minify?}"}
  Assette.config.minifying? && minify?
end