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

Add broccoli-ember-hbs-template-compiler. Fixes #408 #574

Merged
merged 1 commit into from
May 3, 2014
Merged

Add broccoli-ember-hbs-template-compiler. Fixes #408 #574

merged 1 commit into from
May 3, 2014

Conversation

xtian
Copy link
Contributor

@xtian xtian commented May 3, 2014

No description provided.

@xtian
Copy link
Contributor Author

xtian commented May 3, 2014

#562 should also be updated to import handlebars.runtime.js for production builds.

@MajorBreakfast
Copy link
Contributor

@xtian You're right: We probably should use handlebars.runtime.js. But not just for production. If during development the handlebars compiler is available then you tend to use it and it breaks when you build the production version.

@rwjblue
Copy link
Member

rwjblue commented May 3, 2014

Agreed, we should be precompiling all the time.

@xtian
Copy link
Contributor Author

xtian commented May 3, 2014

@MajorBreakfast Often I need to use Ember.Handlebars.compile when testing helpers and components like in this example: http://emberjs.com/guides/testing/testing-components/#toc_components-using-other-components

@stefanpenner
Copy link
Contributor

I would like it if even those test templates got precompiled. @rjackson I know we precompile inline templates in ember proper, should we follow that same approach here? Or should we maybe have a test/templates/* that get compiled, and easy access for our tests?

@xtian
Copy link
Contributor Author

xtian commented May 3, 2014

@stefanpenner I'm not sure if you deleted your comment or if it got erased by my force push.

Do you want me to leave broccoli-template in the plugin registry?

@stefanpenner
Copy link
Contributor

@xtian nah, lets encourage only pre-compilation.

@stefanpenner
Copy link
Contributor

@xtian I'm fine with the runtime only being included in production as a short term solution, a long term solution would be to discourage it entirely, but I suspect that will not be trivial.

If you rebase, I'll merge.

@xtian
Copy link
Contributor Author

xtian commented May 3, 2014

@stefanpenner Rebased

@rwjblue
Copy link
Member

rwjblue commented May 3, 2014

I'm 👍, but just want to call out the fact that we now need two steps to update Ember versions since we would be using the ember-template-compiler package AND Bower. This is potentially error prone.

I am working on updating this plugin (upstream) to accept the path to the compiler as an option. Then we can simply use the ember-template-compiler.js that comes with our Ember version without an issue.

stefanpenner added a commit that referenced this pull request May 3, 2014
Add broccoli-ember-hbs-template-compiler. Fixes #408
@stefanpenner stefanpenner merged commit 8bb9831 into ember-cli:master May 3, 2014
@stefanpenner
Copy link
Contributor

just confirmed that it works, and it seems to work great :)

@xtian xtian deleted the precompile-hbs branch May 3, 2014 15:18
@xtian
Copy link
Contributor Author

xtian commented May 3, 2014

😀

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