Permalink
Browse files

use chriseppstein's compass config

  • Loading branch information...
1 parent 1b32caa commit 291ad051a7ac9dbf57cc08f3e66a5cd3d9285acc @seaofclouds committed Mar 17, 2009
Showing with 10 additions and 1 deletion.
  1. +10 −1 app.rb
View
@@ -8,10 +8,19 @@
set :root, File.dirname(__FILE__)
set :views, "views"
+configure do
+ # configure compass
+ Compass.configuration do |config|
+ config.project_path = File.dirname(__FILE__)
+ config.sass_dir = File.join(Sinatra::Application.views, 'stylesheets')
+ config.output_style = :compact
+ end
+end
+
# at a minimum, the main sass file must reside within the ./views directory. here, we create a ./views/stylesheets directory where all of the sass files can safely reside.
get '/stylesheets/:name.css' do
content_type 'text/css', :charset => 'utf-8'
- sass(:"stylesheets/#{params[:name]}", :sass => { :load_paths => ( [ File.join(Sinatra::Application.views, 'stylesheets') ] + Compass::Frameworks::ALL.map { |f| f.stylesheets_directory } ) } )
+ sass :"stylesheets/#{params[:name]}", :sass => Compass.sass_engine_options
end
get '/' do

0 comments on commit 291ad05

Please sign in to comment.