Barista - 在Rails和Rack简单、透明的使用CoffeeScript
jopen
12年前
Barista是一组工具,方便在Rails 3, Rails 2 和 Rack 应用中使用CoffeeScript。你可以把它想象成类似于Compass,但使用CoffeeScript代替Sass。Barista还能够实现:
- Automatic support for a
:coffeescript
filter in Haml (when Haml is loaded before Barista) — automatically converting inline CoffeeScript to JavaScript for you. - Where possible, support for
coffeescript_include_tag
andcoffeescript_tag
. - When possible, instead of pre-compiling in development and test modes, Barista will embed CoffeeScript in the page for you.
- Support for Heroku via therubyracer-heroku and either pre-compiled JS or, optionally, a lightweight Rack app that generates on request.