Sha256: 5fad9351f7978993e6948891335fd968c6b962b6fbaab246a0d31dc3253b3d21

Contents?: true

Size: 399 Bytes

Versions: 1

Compression:

Stored size: 399 Bytes

Contents

require 'yui/compressor'

Pakyow::Assets.preprocessor :css, fingerprint: true, fingerprint_contents: true do |path|
  content = File.read(path)

  if Pakyow::Config.assets.minify
    begin
      YUI::CssCompressor.new.compress(content)
    rescue YUI::Compressor::RuntimeError
      Pakyow.logger.warn "Unable to minify #{path}; using raw content"
      content
    end
  else
    content
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pakyow-assets-0.1.2 lib/preprocessors/css-preprocessor.rb