This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A small Flask extension that adds CoffeScript support to Flask.

Project Description

A small Flask extension that makes it easy to use CoffeeScript with your Flask application.

Usage

You can activate it by calling the coffee2js function with your Flask app as a parameter:

from flaskext.coffee2js import coffee2js coffee2js(app, js_folder=’js’, coffee_folder=’src/coffee’)

This will intercept the request to js_folder and compile de file if is necesary using the files from coffee_folder.

When you deploy your app you might not want to accept the overhead of checking the modification time of your .coffee and .jss files on each request. A simple way to avoid this is wrapping the coffee2js call in an if statement:

if app.debug:
from flaskext.coffee2js import coffee2js coffee2js(app)

If you do this you’ll be responsible for rendering the .coffee files into .js when you deploy in non-debug mode to your production server.

Release History

Release History

This version
History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
flask-coffee2js-0.1.2.zip (5.8 kB) Copy SHA256 Checksum SHA256 Source Sep 8, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting