Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Forked from squeejee/compass.rb for theme_support
Created April 23, 2009 02:12
Show Gist options
  • Save chriseppstein/100241 to your computer and use it in GitHub Desktop.
Save chriseppstein/100241 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"
# config/initializers/compass.rb
require 'compass'
Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config"))
Compass.configuration.environment = RAILS_ENV.to_sym
Compass.configure_sass_plugin!
Theme.find_all.map(&:name).each do |theme|
# This will put the compiled css in the same location as the sass... :-(
Sass::Plugin.options[:template_location]["#{RAILS_ROOT}/themes/#{theme}/stylesheets"] = "#{RAILS_ROOT}/themes/#{theme}/stylesheets"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment