I would like to introduce a new way to describe assets such as SASS, LESS and every other language webassets supports:
{% for url in compile('style.scss', filters="scss,gzip", output="style.%(version)s.css",
depends=["scss/*.css", "scss/*.scss"]) %}
<link media="all" href="{{ url }}" rel="stylesheet" />
{% endfor %}
This will compile the master theme/style.scss file using SCSS to the
specified output (the %(version).s is a placeholder for the version hash).
Use the depends keyword to watch additional files for changes (the import
clause within a stylesheet does not work yet).
Currently only working for Python 2.6 and 2.7 (Webassets is not yet compatible with Python 3 but they are working on this) and Jinja2. You can check out the feature/webassets branch if you like.
I would like to introduce a new way to describe assets such as SASS, LESS and every other language webassets supports:
This will compile the master
theme/style.scss
file using SCSS to the specified output (the%(version).s
is a placeholder for the version hash). Use thedepends
keyword to watch additional files for changes (theimport
clause within a stylesheet does not work yet).Currently only working for Python 2.6 and 2.7 (Webassets is not yet compatible with Python 3 but they are working on this) and Jinja2. You can check out the
feature/webassets
branch if you like.