-
Notifications
You must be signed in to change notification settings - Fork 29
hbsfy with --traverse fails with inline partials #54
Comments
👍 |
Jk, made the pull request anyway. If anyone wants to check it out, I'd appreciate it. |
I'm working out the fact that you still have to revert the name of the partial back to its non-prefixed state after skipping the commonjs aspect. |
Well, without attempting to do just-in-time updates to the
|
@kentmw thank you so much for the initiative with the PR! Also for reporting this, I had no idea handlebars added this. While your What do you think about instead searching the template for |
@kirbysayshi updated my PR to be transparent with no new syntax. Also added tests. |
@kirbysayshi I think it's ready for your review. |
@kirbysayshi sorry to be persistent, but I was hoping you could take a look at the PR this week. Our project is blocked until this is resolved. Hopefully it just needs a merge and re-release |
If you're using npm, you can always refer to your github fork in your package.json so to not be blocked by PRs to public packages |
@kirbysayshi thanks for the tip. Pretty sure the company I'm working with wouldn't be too happy moving their project to depend on my github fork, but I'll give it a go. I appreciate the thought. |
#54 - adding capability to use inline partials with --traverse flag
Should be fixed in v2.7.0, published. |
Thank you!! |
With Handlebars 4.0.0, they introduced inline partials: http://handlebarsjs.com/partials.html#inline-partials
Our project added the --traverse flag so that we could bundle our partials in our browserify bundles (very helpful!).
These don't seem to mix as the inline partials are defined inline inside the same template.
Take this example from the handlebars documentation:
In this example myPartial will assumed to be node_module dependency. My thoughts is it would be nice to be able to give an indication to the hbsfy parser that this is an inline partial and not modify it.
Something like:
I believe this would just require:
on line https://github.com/epeli/node-hbsfy/blob/master/index.js#L139
I'll make a pull request if we think this the way to solve this.
The text was updated successfully, but these errors were encountered: