bullrico (owner)

Revisions

gist: 101428 Download_button fork
public
Public Clone URL: git://gist.github.com/101428.git
Embed All Files: show embed
compass.config #
1
2
3
4
5
6
7
8
9
10
11
# 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"
 
compass.rb for theme_support #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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