Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Django Static Precompiler provides template tags and filters to compile CoffeeScript, LiveScript, SASS / SCSS, LESS, Stylus, Babel and Handlebars. It works with both inline code and external files.

License

DemocracyClub/django-static-precompiler

 
 

Repository files navigation

Django Static Precompiler

Django Static Precompiler provides template tags and filters to compile CoffeeScript, LiveScript, SASS / SCSS, LESS, Stylus, Babel and Handlebars. It works with both inline code and external files.

Build Status

Code Coverage

Code Climate

Documentation

Gitter

Documentation

Documentation is available at http://django-static-precompiler.readthedocs.org.

Install

pip install django-static-precompiler

Use in templates

{% load compile_static %}
{% load static %}

<script src="{% static "path/to/script.coffee"|compile %}"></script>
<link rel="stylesheet" href="{% static "path/to/styles1.less"|compile %}" />
<link rel="stylesheet" href="{% static "path/to/styles2.scss"|compile %}" />

Use in Python

>>> from static_precompiler.utils import compile_static
>>> compile_static("styles.scss")
"COMPILED/styles.css"

About

Django Static Precompiler provides template tags and filters to compile CoffeeScript, LiveScript, SASS / SCSS, LESS, Stylus, Babel and Handlebars. It works with both inline code and external files.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.2%
  • Shell 0.9%
  • CSS 0.7%
  • CoffeeScript 0.1%
  • Ruby 0.1%
  • JavaScript 0.0%