Summary. Using Compass, you need to compile SASS stylesheets twice with different output styles and file names.
I have it like my config.rb:
http_path = "/" css_dir = "assets/css" sass_dir = "assets/sass"
which compiles fine
assets β sass β£ style1.scss β style2.scss
to
assets β css β£ style1.css β style2.css
What I need to do is:
assets β css β£ style1.css β£ style1.min.css β£ style2.css β style2.min.css
where the .min.css files contain apparently reduced CSS.
So, I decided that I needed to come up with something like:
on_stylesheet_saved do |filename| # switch output_style to :compressed # compile again and include ".min" into file name end
Can someone provide me with a basic sample of how to do this? Until now, I have not cursed with ruby, but I come to a basic understanding through all the readings that I did on this topic .;) Thank you, heap!
source share