Changing the output directory of the resulting CSS file in Compass/Webby?

81 views
Skip to first unread message

leeand00

unread,
Mar 24, 2010, 1:21:08 PM3/24/10
to Webby
I'm using Compass chriseppstein-compass-0.8.17 and Webby 0.9.4 and
SASS 2.22.2 (Powerful Penny)

I'm passing in a configuration to webby for it to run compass. I want
my compiled css file to be output to a directory called "css1", but
instead it keeps coming out in the default directory "stylesheets"

Bellow is my Sitefile:

require 'compass'

SITE.output_dir = '..\JSMVCUpgrade\ecomm_build_directory\src'

Compass.configuration do |config|
config.project_path = File.dirname(__FILE__)
config.sass_dir = File.join('src','stylesheets')
config.css_dir = "css1"
# config.sass_options = {:css_location => File.join('src', 'css1') }
config.output_style = :expanded
end

printf("config.sass_dir:%s\n", Compass.configuration.sass_dir)
printf("config.css_dir:%s\n", Compass.configuration.css_dir)

Webby.site.sass_options.update(Compass.sass_engine_options)
# Require any additional compass plugins here.
#project_type = :stand_alone
#css_dir = "output/folder/css"
#sass_dir = "src"
#images_dir = :relative
#output_style = :compact
# To enable relative image paths using the images_url() function:
# http_images_path = "/img"

task :default => :build

desc 'deploy the site to the webserver'
task :deploy => [:build, 'deploy:rsync']

# EOF

I looked in C:\ruby\lib\ruby\gems\1.8\gems\chriseppstein-
compass-0.8.17\lib\compass\configuration.rb and I found the following
settings that you should be able to set:

ATTRIBUTES = [
:project_type,
:project_path,
:http_path,
:css_dir,
:sass_dir,
:images_dir,
:javascripts_dir,
:output_style,
:environment,
:relative_assets,
:http_images_path,
:http_stylesheets_path,
:http_javascripts_path,
:additional_import_paths,
:sass_options
]

with css_dir being one of them.

I also tried setting the sass_options so that sass would output to the
css_location (the documentation for sass reads that this only works on
rails, and a few other frameworks.)

Thank you,
Andrew J. Leer

Reply all
Reply to author
Forward
0 new messages