wet-boew/wet-boew — pull request #14 by sylus (2012-05-28 21:06:58+00:00)
Title: Initial SASS/SCSS WET Conversion

Hey all.

So after a lot of work I have successfully integrated SASS + Compass + Zen Grids into the build out. What I have done is the following:

a) Replaced all css with scss files, which during the build out process compile into css files
b) The build will then continue as usual running on the css files
c) The css files are then removed in the src dir.

With the SASS integration the following ant commands are available (note if installed compass commands (watch and compile) also will work in each directory sass is installed so can choose your preference). Compile will convert all scss files into their css counterparts, and watch will poll for changes and update the css anytime a file is saved.

a) root directory of project

ant (run everything)
ant sass (only run sass to css conversion)
ant clean-css (remove all css directories in src/*)

b) src directory of project

ant compile-css.sass
ant compile-gcwu.sass
ant compile-grids.sass
ant compile-intranet.sass
ant compile-js.sass

ant watch-css.sass
ant watch-gcwu.sass
ant watch-grids.sass
ant watch-intranet.sass
ant watch-js.sass

There is a small caveat to make all of this work and that is a jruby.jar must be created and compiled with the needed ruby gems (compass, sass, zen-grids). I have fixed this by making ant do the work in creating this file (see src/build.xml). I did not want to include the jruby.jar in the git repo due to its size and felt it was more appropriate during the build out. Also the ant script will only build this file once and subsequent runs will be faster. So there are some considerations that would need to be made.

a) Keep the existing solution and let ant perform the jruby.jar build out (internet required)
b) Preassemble the jruby.jar and host someplace and let ant download it (internet require)
c) Incorporate the compiled jruby.jar inside the build out
d) Manually download the jruby.jar file and place it in the build/lib directory.

Anyways all scss files now have the ability to run the following and any corresponding libraries:

http://sass-lang.com
http://compass-style.org
http://zengrids.com/