Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Templates and mixins #53

wants to merge 3 commits into from

Conversation

forste
Copy link

@forste forste commented Jun 11, 2012

Added support for templates and mixins. See Readme for more.

@tj
Copy link
Owner

tj commented Jun 11, 2012

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 %>
Copy link
Owner

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 %>

Copy link
Author

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

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.

@forste
Copy link
Author

forste commented Jun 11, 2012

let me know if characters [+~#] or strings (which ones) are prefered. I can fix the rest then and re-request

@forste
Copy link
Author

forste commented Jun 11, 2012

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

@rummik
Copy link

rummik commented Oct 19, 2012

@forste From the way things read, strings are the preferred

TimothyGu added a commit to TimothyGu/ejs-tj that referenced this pull request Feb 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants