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

handlebars 3.0 support #349

Closed
mattkime opened this issue Feb 10, 2015 · 7 comments
Closed

handlebars 3.0 support #349

mattkime opened this issue Feb 10, 2015 · 7 comments
Labels
Milestone

Comments

@mattkime
Copy link

changes are outlined here - https://github.com/wycats/handlebars.js/blob/master/release-notes.md#v300---february-10th-2015

additional template features are of particular interest.

@husayt
Copy link

husayt commented Feb 25, 2015

Does anyone know if handlebars 3 already supported? If we just switch js library to handlebars,js 3 will it work?

@mattkime
Copy link
Author

the handlebars js file is only used for hbs -> js compilation. rendering of templates uses java

@grnadav
Copy link

grnadav commented Apr 7, 2015

@mattkime I didn't understand from your reply whether it's supported or not.
Can one just set
handlebars.handlebarsJsFile("/handlebars-v3.0.0.js");
and expect it to work?

@mattkime
Copy link
Author

mattkime commented Apr 7, 2015

@grnadav if you're using handlebars.java to render hbs templates then that code won't change a thing. the js file is only used to compile hbs files into javascript. this is useful when rendering hbs on the client as its faster and doesn't require the full handlebars.js functionality.

@grnadav
Copy link

grnadav commented Apr 7, 2015

@mattkime Got it. Thanks!

@jknack
Copy link
Owner

jknack commented Apr 26, 2015

Guys,

I will release a 2.1.0 tomorrow, which has partials params #350 & #357.

But I'm not sure what else is new in terms of language feature, so do me a favor and open new issues describing what else need to be done to create a 3.0.0 compatible version.

For now, I will close this issue bc it is too vague.

Thanks

@jknack jknack closed this as completed Apr 26, 2015
@jknack jknack added the invalid label Apr 26, 2015
@jknack jknack added this to the 2.1.0 milestone Apr 26, 2015
@husayt
Copy link

husayt commented Apr 27, 2015

Thanks for latest updates @jknack .

In terms of new features from hbs.js3 from version 2 I can see these:

  • #906 - Block Params
  • #941 - Add support for dynamic partial names
  • #892 - Chained else blocks
  • #910 - @last and other each changes
  • #805 - Strict Mode
  • #886 - Add SafeString to context (or use duck-typing)
  • #887 - Handlebars.noConflict() option?
  • # - @DaTa methods can now have helper parameters passed to them
  • #940, #964 - Add missing reserved words so compiler knows to use array syntax:

Here is a full release notes for hbs.js:
https://github.com/wycats/handlebars.js/blob/master/release-notes.md

I am not sure which of these are already supported. Some of them might not even make sense for Java environment.

As hbs.js is evolving it will be difficult to maintain 1-1 compatibility. What might help is to be able to run hbs.js unit tests as part of hbs-java unit tests.

Again thanks for great work, it is very appreciated.

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

No branches or pull requests

4 participants