Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

fix .hbs vs .handlebars template extension issues #117

Open
eriktrom opened this issue Dec 15, 2013 · 1 comment
Open

fix .hbs vs .handlebars template extension issues #117

eriktrom opened this issue Dec 15, 2013 · 1 comment

Comments

@eriktrom
Copy link
Contributor

At least one issue with the file extension of a handlebars template has been found.

When using the template helper in the following example Thorax automatically appends .handlebars to the end of the templateName. B/c templates generated by the generator all currently use .hbs, and because the rjs plugin only currently processes templates ending .hbs the following code will not currently work:

{{#collection}}
  {{template "templates/book"}}
{{/collection}}

In the console, the following error will be shown:

Uncaught Error: templates: templates/book.handlebars does not exist

Similar issues are likely to exist, i will explore and update this issue with info I find accordingly.

A quick fix is simply to rename all .hbs to .handlebars and change the file extension expected in the rjs !hbs plugin, but a way to use .hbs and .handlebars would be more ideal. Another option is to precompile(like the old days).

I'm linking all issues that can be solved by pre-compilation(but not in favor of it at all, unless they add up to something significant, but they won't) - #118

@schjetne
Copy link

This has been an open issue since 2013. Are there any plans for this? Seems like a fairly major bug, really. I stumbled hard on this for a while until I found this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants