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

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

Class Method Summary collapse

Class Method Details

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



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

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