Skip to content

Instantly share code, notes, and snippets.

@jalcine
Created August 29, 2013 04:00
Show Gist options
  • Save jalcine/6374129 to your computer and use it in GitHub Desktop.
Save jalcine/6374129 to your computer and use it in GitHub Desktop.
require "sinatra"
require "haml"
class TicTacToe < Sinatra::Base
configure do
set :haml, {:format => :html5, :escape_html => true}
set :scss, Compass.sass_engine_options
set :sass, Compass.sass_engine_options
Compass.configuration do | cfg |
cfg.project_path = File.dirname(__FILE__)
cfg.sass_dir = File.dirname(__FILE__) + "/public/stylesheets"
end
end
get "/" do
haml :page
end
get "/:name.css" do
content_type "text/css", charset: "utf-8"
scss :"../public/stylesheets/sass/#{params[:name]}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment