Skip to content

Instantly share code, notes, and snippets.

@bts
Created August 22, 2010 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bts/543423 to your computer and use it in GitHub Desktop.
Save bts/543423 to your computer and use it in GitHub Desktop.
require 'sass'
configure do
Tilt.register 'scss', Tilt::SassTemplate
set :scss, :syntax => :scss
end
get '/stylesheets/:file.css' do |file|
content_type 'text/css', :charset => 'utf-8'
# no #scss method is defined (and #sass only looks for .sass files)
# we must call render ourself:
render :scss, file.to_sym, :layout => false, :views => './public/stylesheets'
end
require 'sass/plugin/rack'
Sass::Plugin.options[:template_location] = 'public/stylesheets'
use Sass::Plugin::Rack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment