Module: RapperLite::Compressors

Included in:
Engine
Defined in:
lib/rapper_lite/compressors.rb

Overview

Compression handlers for various types of assets. And by “various” I mean JavaScript and CSS.

Defined Under Namespace

Classes: CSSCompressor, Compressor, JSCompressor

Instance Method Summary collapse

Instance Method Details

#compress(file_path) ⇒ Object

Compress a file in-place. Relies on the file’s suffix to determine type.



12
13
14
15
16
17
# File 'lib/rapper_lite/compressors.rb', line 12

def compress( file_path )
  opts = {}
  # TODO: Someday this goes away.
  opts = self.yui_config if file_path =~ /\.js/
  RapperLite::Compressors::Compressor.compress( file_path, opts )
end