Skip to content

Instantly share code, notes, and snippets.

@bullrico
Forked from chriseppstein/compass.config
Created April 25, 2009 00:45
Show Gist options
  • Save bullrico/101428 to your computer and use it in GitHub Desktop.
Save bullrico/101428 to your computer and use it in GitHub Desktop.
# config/compass.rb
# Require any additional compass plugins here.
project_type = :rails
project_path = RAILS_ROOT if defined?(RAILS_ROOT)
css_dir = "public/stylesheets/compiled"
sass_dir = "app/stylesheets"
images_dir = "public/images"
javascripts_dir = "public/javascripts"
output_style = :compact
http_images_path = "/public/images"
require 'compass'
location_hash = {
"#{RAILS_ROOT}/app/stylesheets" => "#{RAILS_ROOT}/public/stylesheets"
}
# My fork of theme_support has a Themed model due to a name collision in my project http://github.com/bullrico/theme_support/tree/master
# Separate sass and compiled dirs, so theme_support only copies over compiled to the public cache dir
Themed.find_all.map(&:name).each do |theme|
location_hash["#{RAILS_ROOT}/themes/#{theme}/stylesheets/sass"] = "#{RAILS_ROOT}/themes/#{theme}/stylesheets/compiled"
end
Sass::Plugin.options[:template_location] = location_hash
Compass::Frameworks::ALL.each do |framework|
Sass::Plugin.options[:template_location][framework.stylesheets_directory] = "#{RAILS_ROOT}/public/stylesheets"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment