Skip to content

Instantly share code, notes, and snippets.

@bordy
Forked from ambethia/compass_template.rb
Created March 5, 2010 16:11
Show Gist options
  • Save bordy/322859 to your computer and use it in GitHub Desktop.
Save bordy/322859 to your computer and use it in GitHub Desktop.
sass_dir = ask("Where would you like to keep your sass files within your project? (default: 'app/stylesheets')")
sass_dir = "app/stylesheets" if sass_dir.blank?
css_dir = ask("Where would you like Compass to store your compiled css files? (default: 'public/stylesheets')")
css_dir = "public/stylesheets" if css_dir.blank?
compass_command = "compass --rails . --css-dir=#{css_dir} --sass-dir=#{sass_dir} "
file 'vendor/plugins/compass/init.rb', <<-CODE
# This is here to make sure that the right version of sass gets loaded (haml 2.2) by the compass requires.
require 'compass'
CODE
run "haml --rails ."
run compass_command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment