Created
August 17, 2014 18:03
-
-
Save jakelodwick/4b6e1f938403a1c92cf5 to your computer and use it in GitHub Desktop.
CoffeeScript in Sinatra apps
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
#put this in your Gemfile: | |
gem "rack-coffee" | |
#(don't forget to run `bundle` on the command line) | |
#put this in your Sinatra app: | |
use Rack::Coffee, | |
:root => 'public', | |
:urls => '/coffee', | |
:join => 'index', | |
:bare => true | |
#store .coffee files like this: | |
#./public/coffee/Foo.coffee | |
#request them like this: | |
#http://server/coffee/Foo.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment