Class: Linner::Compressor

Inherits:
Object
  • Object
show all
Defined in:
lib/linner/compressor.rb

Class Method Summary collapse

Class Method Details

.compress(asset) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/linner/compressor.rb', line 7

def self.compress(asset)
  if asset.javascript? or asset.template?
    Uglifier.compile asset.content, comments: "none"
  elsif asset.stylesheet?
    CSSminify.new.compress asset.content
  else
    asset.content
  end
end