New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templates and mixins #53
base: master
Are you sure you want to change the base?
Conversation
looks decent I'll go through and review! |
@@ -18,6 +18,8 @@ Embedded JavaScript templates. | |||
* Filter support for designer-friendly templates | |||
* Client-side support | |||
* Newline slurping with `<% code -%>` or `<% -%>` or `<%= code -%>` or `<%- code -%>` | |||
* Templating with <%+ template.html %> and <%~ argumentName %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe some others will chime in here, but I would personally rather see these named instead of introducing a bunch more chars to remember. Maybe <% extend template.html %>
and <% block name %>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought about that as well. for consistency I picked the chars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chiming in. I personally prefer extend and block as well, more expressive.
let me know if characters [+~#] or strings (which ones) are prefered. I can fix the rest then and re-request |
additionally I thought about allowing compile templates and mixins so that they don't have to be composed every request. compilation would be independent from caching mechanisms |
@forste From the way things read, strings are the preferred |
Fixes tj#53.
Added support for templates and mixins. See Readme for more.