Class: Assette::PostProcessor::CSSMin

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

Instance Method Summary collapse

Instance Method Details

#minify?Boolean

Returns:

  • (Boolean)


10
11
12
13
14
15
16
17
18
# File 'lib/assette/post_processors/css_min.rb', line 10

def minify?
  # minify = false
  # minify ||= @args[:parent].minify? if @args[:parent]
  # minify &&= !file.never_minify?
  # puts @args[:parent].minify? if @args[:parent]
  # puts !file.never_minify?
  # minify
  minify ||= @args[:parent].minify? if @args[:parent]
end

#processorObject



20
21
22
# File 'lib/assette/post_processors/css_min.rb', line 20

def processor
  Reader::Less.new(@file).compile(:compress => true).chomp
end

#should_process?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
# File 'lib/assette/post_processors/css_min.rb', line 4

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?}"}
  # puts Assette.config.minifying? && minify?
  Assette.config.minifying? && minify?
end