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

Please allow more flexible Mustache partial syntax #146

Closed
e2tha-e opened this issue Sep 10, 2015 · 3 comments
Closed

Please allow more flexible Mustache partial syntax #146

e2tha-e opened this issue Sep 10, 2015 · 3 comments

Comments

@e2tha-e
Copy link
Contributor

e2tha-e commented Sep 10, 2015

I have a Pattern Lab implementation I'm porting over from PHP. The PHP version allows the following syntax for partials:

  • {{> templates-article }}
  • {{> 03-templates/02-article }}
  • {{> 03-templates/02-article.mustache }}

The Node version only allows the first. The greater flexibility of the PHP version is mandatory for my implementation. I'm submitting a pull request to allow for this. Please review, comment, and merge. Thanks!

@bmuenzenmeyer
Copy link
Member

This would be a welcome addition @e2tha-e I was not aware the PHP version supported those. In my opinion they are not necessary because the "pattern key" in all instances is templates-article and the numerals are just a poorman's ordering device - but by all means PR away!

Please do add some unit tests wherever partials are being tested too.

👍 :

@e2tha-e
Copy link
Contributor Author

e2tha-e commented Sep 10, 2015

@bmuenzenmeyer I found the only advantage to the terse partials was terseness. As the project got bigger, knowing the exact paths of partials was a HUGE timesaver. And on top of that, I created a Mustache file browser which allowed you to recurse through many levels of partials, and this also required exact paths.

@bmuenzenmeyer
Copy link
Member

Merged the PR associated to this as part of release v0.12.0

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

No branches or pull requests

2 participants