No commit activity in last 3 years
No release in over 3 years
Makes coffeescript javascript
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Rack::CoffeeFilter

Watches for .coffee requests and tries to compile down to javascript. It will only try to compile HTTP 2xx responses; everything else just gets passed along. It doesn't check to see if the file is actually coffeescript because it's not your mom. It doesn't do caching. Produces bare (unwrapped) javascript by default. Do use Rack::CoffeeFilter::Filter, true to wrap.

You might think you want to use this gem. You could be wrong. It probably only makes sense for very small projects or in development.

Caveat

Some rack servers (like Pow) serve files in /public statically. In those cases this gem won't do anything.

Installation

Add this line to your application's Gemfile:

gem 'rack-coffee_filter'

Usage

In your config.ru

use Rack::CoffeeFilter::Filter
# if you want to wrap the output in a function
# use Rack::CoffeeFilter::Filter, true