Compile SASS Using Compass Config File

A short follow-up to an article I wrote a few weeks ago about compiling SASS using Compass under Eclipse (specifically see Step 6). I mentioned at the time that it would be good to reduce the arguments passed to Compass via the Eclipse builder. Here’s how to do it.

You’ll need to place the following in a file named config.rb in the root directory of your project.

# Set this to the root of your project when deployed:
http_path = "/"

# Web CSS Directory
css_dir = "WebContent/css"

#SASS Directory
sass_dir = "./sass"

#Web Images Directory
images_dir = "WebContent/img"

# Web Javascript Directory
javascripts_dir = "WebContent/js"

# I use SUSY for grid layouts
require "susy"

The Compass builder now only requires “compile” to be passed as an argument. This is much easier to copy between projects, and much simpler to set up in new projects.

[GARD]


COMMENTS