Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
A minimal Sinatra app preconfigured for Compass:
require 'sinatra' require 'haml' require 'sass' require 'compass' configure do Compass.configuration do |config| config.project_path = File.dirname(__FILE__) config.sass_dir = 'views' end set :haml, format: :html5 set :sass, Compass.sass_engine_options set :scss, Compass.sass_engine_options end get '/sass.css' do sass :sass_file end get '/scss.css' do scss :scss_file end
If you keep your stylesheets in "views/stylesheets/" directory instead of just "views/", remember to update
sass_dir configuration accordingly.
Check out this sample compass-sinatra project to get up and running in no time!
- Sinatra Bootstrap - a base Sinatra project with support for Haml, Sass, Compass, jQuery and more.