Class: Middleman::Extensions::MinifyCss::SassCompressor

Inherits:
Object
  • Object
show all
Defined in:
middleman-core/lib/middleman-core/extensions/minify_css.rb

Constant Summary collapse

COMPRESSED_OPTIONS =
{ style: :compressed }.freeze

Class Method Summary collapse

Class Method Details

.compress(style, options_hash = ::Middleman::EMPTY_HASH) ⇒ Object


21
22
23
24
25
26
27
28
29
# File 'middleman-core/lib/middleman-core/extensions/minify_css.rb', line 21

def self.compress(style, options_hash = ::Middleman::EMPTY_HASH)
  options = if options_hash == ::Middleman::EMPTY_HASH
              COMPRESSED_OPTIONS
            else
              options_hash.merge(COMPRESSED_OPTIONS)
            end

  ::SassC::Engine.new(style, options).render.strip
end