There is also an app for Django called django-gears that integrates Gears into Django project. You can read more on the project page.
Dependency management using directives in header comments. For example:
/* Dependencies: *= require jquery *= require underscore *= require backbone *= require_directory templates */
Three directive types is supported for now:
require :path: includes the contents of the asset
pathsuffixed with the same extension as the current asset (e.g., if
js/views.js.coffeewill be included).
require_directory :path: includes the contents of the every asset in the directory
pathwith the same suffix as the current asset in alphabetical order.
require_self: includes the contents of the current asset at the current place. If there is no
require_selfdirective, the contents will be appended at the end of asset.
Scripting and styling in modern languages like CoffeeScript, Stylus, Less, SASS and SCSS (support for new languages can be easily added).
Writing client templates using Handlebars.
The list of compilers for the asset is specified with asset extensions appended to the original extension. E.g., for the asset named
js/app.js.coffeeCoffeeScript compiler will be used. Here are extensions for the supported compilers:
- CoffeeScript -
- Handlebars -
- Stylus -
- Less -
- SASS -
- SCSS -
- CoffeeScript -
While there is no stable release of Gears yet, you can install it from this repository using pip:
pip install -e https://github.com/trilan/gears#egg=Gears
If you want to use compilers you need to install other dependencies:
lessnode.js modules for CoffeeScript, Handlebars, Stylus, Less support respectively;
sassRuby gem for SASS and SCSS support.
There is already mentioned django-gears app, which you may want to use in your Django projects.
Feel free to fork, send pull requests or report bugs and issues on github.