flask-coffee2jsA tiny Flask plugin that adds CoffeScript support to Flask | |
Download |
flask-coffee2js Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Price:
- FREE
- Publisher Name:
- Manuel Albarran
- Publisher web site:
- https://github.com/weapp/
flask-coffee2js Tags
flask-coffee2js Description
flask-coffee2js is a small Flask add-on which helps developers to use CoffeeScript in your Flask apps.UsageThis extension can be activated 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.Product's homepage
flask-coffee2js Related Software