Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/farski/rack-coffee_filter
Cut down on your coffee cold turkey.
https://github.com/farski/rack-coffee_filter
Last synced: about 1 month ago
JSON representation
Cut down on your coffee cold turkey.
- Host: GitHub
- URL: https://github.com/farski/rack-coffee_filter
- Owner: farski
- License: mit
- Created: 2012-12-02T19:15:27.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-05T21:44:57.000Z (about 12 years ago)
- Last Synced: 2024-11-06T12:16:28.297Z (2 months ago)
- Language: Ruby
- Size: 109 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this 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