https://github.com/rkh/sinatra-coffeescript-example
https://github.com/rkh/sinatra-coffeescript-example
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rkh/sinatra-coffeescript-example
- Owner: rkh
- Created: 2010-02-24T17:16:38.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2010-02-24T18:04:40.000Z (almost 16 years ago)
- Last Synced: 2025-04-11T16:55:14.914Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 74.2 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Example App for embedding CoffeeScript in Haml code
===================================================
Uses [Haml::More](http://github.com/rkh/haml-more) for embedding [CoffeeScript](http://jashkenas.github.com/coffee-script/) in [Haml](http://haml-lang.com/), see [views/coffee_script.haml](http://github.com/rkh/sinatra-coffeescript-example/blob/master/views/coffee_script.haml).
If you have `node` in your path, it will compile the CoffeeScript code on the server, otherwise it will send the uncompiled code to the client including the CoffeeScript library, so it can be compiled in the browser.
Running locally
---------------
gem install haml-more --pre
gem install sinatra
ruby webapp.rb
Running on Heroku
-----------------
Yes, [it works](http://coffeescript.heroku.com/) on [Heroku](http://heroku.com/) (that's the reason for this repository).
gem install heroku
heroku create
git push heroku master
heroku open