2014-08-08 00:23:36 +02:00
|
|
|
require 'sass-media_query_combiner'
|
|
|
|
require 'autoprefixer-rails'
|
2014-08-14 23:27:17 +02:00
|
|
|
require "./remove-all-comments-monkey-patch"
|
2014-08-08 00:23:36 +02:00
|
|
|
|
|
|
|
on_stylesheet_saved do |file|
|
|
|
|
css = File.read(file)
|
|
|
|
File.open(file, 'w') do |io|
|
|
|
|
io << AutoprefixerRails.process(css, browsers: ["last 2 version", "> 1%"])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
http_path = "/"
|
|
|
|
sass_dir = "./"
|
2014-11-14 17:56:12 +01:00
|
|
|
css_dir = "../css"
|
2014-08-08 00:23:36 +02:00
|
|
|
images_dir = "../img"
|
|
|
|
javascripts_dir = "../js"
|
2014-08-14 23:27:17 +02:00
|
|
|
|
2014-11-14 17:56:12 +01:00
|
|
|
line_comments = false
|
|
|
|
relative_assets = true
|
|
|
|
output_style = :compressed
|
2014-08-14 23:27:17 +02:00
|
|
|
|
|
|
|
# Remove multiline comments - monkey patch
|
|
|
|
class Sass::Tree::Visitors::Perform < Sass::Tree::Visitors::Base
|
2014-11-14 17:56:12 +01:00
|
|
|
# # Removes all comments completely
|
2014-08-14 23:27:17 +02:00
|
|
|
def visit_comment(node)
|
|
|
|
return []
|
|
|
|
end
|
|
|
|
end
|