I see there is the :compressor option on minify_css
how can I pass CssTidy to it ? I would like to have minified css without comments, the default compressor keeps them
I always thought it removes comments by default, but anyway you could try unsetting them in the compass config in your config.rb
compass_config do |config|
# I think the compressed output style also removes comments
# config.output_style = :compressed
config.line_comments = false
end
If your really want to use CssTidy, you could try running it after build with
after_build do
#your script
end
Thanks. the first config does not work ( I still see /* comments */ )
About the second suggestion, since I am not so much familiar with ruby, can you show the code needed for starting the script ?
It’s weird, I’ve been testing it with all of those options and I get no commets except for the /*!
ones. Even the default config works for me.
You don’t need any Ruby code for the afterbuild part, just run whatever you need. Run CssTidy as you were using it through the command line (I read somewhere you can do that, I actually never used CssTidy).
after_build do
'csstidy your_build_folder/your_stylesheets_folder/your_css_file.css'
end