Sha256: 7243b1378ea4524d311c4ce7dfc52fba1982826605ea4ea8ca83397c19129b3f
Contents?: true
Size: 637 Bytes
Versions: 18
Compression:
Stored size: 637 Bytes
Contents
require 'tilt' module Sprockets class UglifierCompressor < Tilt::Template self.default_mime_type = 'application/javascript' def self.engine_initialized? defined?(::Uglifier) end def initialize_engine require_template_library 'uglifier' end def prepare end def evaluate(context, locals, &block) # Feature detect Uglifier 2.0 option support if Uglifier::DEFAULTS[:copyright] # Uglifier < 2.x Uglifier.new(:copyright => false).compile(data) else # Uglifier >= 2.x Uglifier.new(:comments => :none).compile(data) end end end end
Version data entries
18 entries across 18 versions & 5 rubygems