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


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

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