Skip to content

Instantly share code, notes, and snippets.

@esoergel
Created August 21, 2013 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esoergel/6295469 to your computer and use it in GitHub Desktop.
Save esoergel/6295469 to your computer and use it in GitHub Desktop.
<head>
...
{% less "some/less/file.less" %}
{% js "some/js/file.js" %}
{% compress %}
<style type="text/less">
.inline_element {
.child_element {
color: red;
}
}u
</style>
<script type="text/javascript">
// inline javascript
</script>
{% endcompress %}
<script type="text/javascript">
foo = {{ context_var|JSON }}
</script>
</head>
@esoergel
Copy link
Author

With this though, I do think it'd make sense to not use the compress tag directly, rather something that includes less.js and doesn't compress if DEBUG, else uses compress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment