Django Assets Toolkit
A development toolkit for compiling sass and coffee script files.
Installation
`pip install -U django-assets-toolkit`
Usage
Add assetstoolkit in your INSTALLED_APPS settings, then you can load the assetstoolkit from your template files which has three template tags:
scss
less
coffee
You can use it in your templates like:
{% load assetstoolkit %}
...
<link rel="stylesheet" type="text/css" href="{% scss 'css/styles.scss' %}">
<link rel="stylesheet" type="text/css" href="{% less 'css/styles.less' %}">
<script type="text/javascript" src="{% coffee 'src/scripts.coffee' %}"></script>
Have a look at settings.py to see more options.
Note
It will put the compiled sass file in the same directory of .scss file while it’ll put the compiled coffee script on the same level where the script is contained but within js directory. If you want the compiled script to be on a different directory just override COFFEE_OUTPUT settings which should be sibling of directory where script is located.
For the CoffeeScript package to work, you need to actually have the Coffee Script binary in your system. The same is true for Less.
License
Metadata
Release files for django-assets-toolkit 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-assets-toolkit-0.1.2.tar.gz | 3.9 kB | Details |
Release files / django-assets-toolkit-0.1.2.tar.gz
| Download URL | django-assets-toolkit-0.1.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79c8a37e9fd331574fcbb69ff58246cc5bb63fe129646bb85848f9b87f03561d
|
|
BLAKE2b-256 checksum How to use checksums |
53ce9f2022940d1ad7e883baad027efd496abc0a2c804ffdf0c7f89f48ac7a51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |