Created
August 22, 2010 06:30
-
-
Save bts/543423 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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