Skip to content

Instantly share code, notes, and snippets.

@esoergel
Created August 21, 2013 14:48
Show Gist options
  • Select an option

  • Save esoergel/6295469 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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