Class: Sprockets::Exporters::ZopfliExporter

Inherits:
ZlibExporter
  • Object
show all
Defined in:
lib/sprockets/exporters/zopfli_exporter.rb

Overview

Generates a .gz file using the zopfli algorithm from the Zopfli gem.

Instance Method Summary collapse

Methods inherited from ZlibExporter

#call, #skip?

Instance Method Details

#setupObject



8
9
10
11
# File 'lib/sprockets/exporters/zopfli_exporter.rb', line 8

def setup
  @gzip_target = "#{ target }.gz"
  @gzip = Sprockets::Utils::Gzip.new(asset, archiver: Utils::Gzip::ZopfliArchiver)
end