class Sprockets::ClosureCompressor


Sprockets::ClosureCompressor.new({ … })
environment.register_bundle_processor ‘application/javascript’,
Or to pass options to the Closure::Compiler class.
Sprockets::ClosureCompressor
environment.register_bundle_processor ‘application/javascript’,
To accept the default options
Public: Closure Compiler minifier.

def self.call(*args)

def self.call(*args)
  new.call(*args)
end

def call(input)

def call(input)
  input[:cache].fetch(@cache_key + [input[:data]]) do
    @compiler.compile(input[:data])
  end
end

def initialize(options = {})

def initialize(options = {})
  @compiler = ::Closure::Compiler.new(options)
  @cache_key = [
    'ClosureCompressor',
    ::Closure::VERSION,
    ::Closure::COMPILER_VERSION,
    VERSION,
    options
  ]
end