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-hc-1.0.0 lib/linner/compressor.rb
linner-0.12.0 lib/linner/compressor.rb
linner-0.11.6 lib/linner/compressor.rb
linner-0.11.5 lib/linner/compressor.rb
linner-0.11.4 lib/linner/compressor.rb
linner-0.11.3 lib/linner/compressor.rb
linner-0.11.2 lib/linner/compressor.rb
linner-0.11.1 lib/linner/compressor.rb
linner-0.11.0 lib/linner/compressor.rb
linner-0.10.0 lib/linner/compressor.rb
linner-0.9.1 lib/linner/compressor.rb
linner-0.9.0 lib/linner/compressor.rb
linner-0.8.7 lib/linner/compressor.rb
linner-0.8.6 lib/linner/compressor.rb
linner-0.8.5 lib/linner/compressor.rb
linner-0.8.4 lib/linner/compressor.rb
linner-0.8.3 lib/linner/compressor.rb
linner-0.8.2 lib/linner/compressor.rb
linner-0.8.1 lib/linner/compressor.rb
linner-0.8.0 lib/linner/compressor.rb