Sha256: 051bf47e9b468d45fbbc89024004901eec01a4a08d5dcab621944ab7d1783f46

Contents?: true

Size: 342 Bytes

Versions: 28

Compression:

Stored size: 342 Bytes

Contents

require "uglifier"
require "cssminify"

module Linner
  class Compressor

    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
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
linner-0.7.3 lib/linner/compressor.rb
linner-0.7.2 lib/linner/compressor.rb
linner-0.7.1 lib/linner/compressor.rb
linner-0.7.0 lib/linner/compressor.rb
linner-0.6.7 lib/linner/compressor.rb
linner-0.6.6 lib/linner/compressor.rb
linner-0.6.5 lib/linner/compressor.rb
linner-0.6.4 lib/linner/compressor.rb