module Sprockets::Compressing

def js_compressor=(compressor)

The compressor object must respond to `compress`.

Assign a compressor to run on `application/javascript` assets.
def js_compressor=(compressor)
  unregister_bundle_processor 'application/javascript', @js_compressor if defined? @js_compressor
  @js_compressor = nil
  return unless compressor
  if compressor.is_a?(Symbol)
    @js_compressor = klass = config[:compressors]['application/javascript'][compressor] || raise(Error, "unknown compressor: #{compressor}")
  elsif compressor.respond_to?(:compress)
    klass = LegacyProcProcessor.new(:js_compressor, proc { |context, data| compressor.compress(data) })
    @js_compressor = :js_compressor
  else
    @js_compressor = klass = compressor
  end
  register_bundle_processor 'application/javascript', klass
end