Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #12 from iElectric/patch-1

A little bit verbose README
  • Loading branch information...
commit 1bab0497254361ed91ae2048c9adecb1ee4be7f2 2 parents 4710031 + 98e7027
@sontek authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 README.md
View
9 README.md
@@ -22,6 +22,8 @@ webassets.jst_compiler=Handlebars.compile
Then you can just use config.add_webasset to add bundles to your environment
``` python
+ from webassets import Bundle
+
jst = Bundle('templates/*.html',
filters='jst',
output='js/jst.js', debug=False)
@@ -58,6 +60,13 @@ If you are using Jinja2, you can just do the following configuration (this assum
assets_env = config.get_webassets_env()
jinja2_env.assets_environment = assets_env
```
+and then:
+
+``` python
+ {% assets "jst" %}
+ <script type="text/javascript" src="{{ ASSET_URL }}"></script>
+ {% endassets %}
+```
Extras
====================
Please sign in to comment.
Something went wrong with that request. Please try again.