1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/lib/middleman/features/minify_css.rb
2009-11-22 15:37:11 -08:00

18 lines
No EOL
437 B
Ruby
Executable file

module Middleman
module Minified
module Sass
include ::Haml::Filters::Base
def render(text)
result = ::Sass::Engine.new(text, ::Sass::Plugin.engine_options).render
if Middleman::Base.respond_to?(:minify_css?) && Middleman::Base.minify_css?
compressor = YUI::CssCompressor.new
compressor.compress(result)
else
result
end
end
end
end
end