ruby - Compile 2 css files with Sass -
i want compile 2 .css files each time save style.sass file
for illustration :
style.dev.css development these options :
sass_options = {:debug_info => true}
and style.css production these options :
sass_options = {:debug_info => false} output_style = :compressed line_comments = false
the goal have firesass ready css file on local machine , compressed version on svn. time beingness have edit config.rb each time want commit alter on svn.
is possible ?
first of all, bookcasey mentioned, should not store compiled css in version control.
to deploy frontend, utilize git hooks: automatically recompile sass upon deployment using git hooks.
second, solution suggested won't solve nuisance of editing configuration each time. it's instead of editing config.rb
, you'll have edit html load necessary css file.
but there's handy workaround.
1) modify config.rb
create utilize of environment
flag:
if environment == :development sass_options = {:debug_info => false} output_style = :compressed line_comments = false else sass_options = {:debug_info => true} end
2) compile sass compass compile -e development
development environment , vanilla compass compile
production.
yay!
css ruby sass
No comments:
Post a Comment