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

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

Class Method Summary collapse

Class Method Details

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



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

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