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

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

Class Method Summary collapse

Class Method Details

.compress(style, options = {}) ⇒ Object



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

def self.compress(style, options={})
  root_node = ::Sass::SCSS::CssParser.new(style, 'middleman-css-input', 1).parse
  root_node.options = {}.merge!(options).merge!(style: :compressed)
  root_node.render.strip
end