gruntjs/grunt-contrib-handlebars

Handlebars 2.0

Closed this issue · 21 comments

We need to update to that.

Ref: #99

+1 I am getting the error: Uncaught Error: Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (>= 2.0.0) or downgrade your runtime to an older version (<= 1.0.rc.2).

lazd commented

I feel that the Handlebars version should be the responsibility of the parent package, not the Grunt plugin. This could be accomplished using peerDependencies or by accepting the compiler as an option to the plugin itself. See the discussion in gulp-handlebars surrounding this.

peerDependencies are on their way out so maybe the second option is more suitable

Handlebars 2.0.0-beta.1 has been released. I think it will not take too long to the release of the final version.

Is there any work necessary on grunt-contrib-handlebars for using Handlebars 2.0.0?

Is this grunt task compatible with Handlebars 2.0.0?

I am following this guide: http://danburzo.ro/grunt/chapters/handlebars/
and it only works with handlebars 1.3.0

Thanks!

+1, I'm using this task with grunt-browserify and I had to downgrade Handlebars to 1.3.0

Is there a branch where we can test grunt-contrib-handlebars with handlebars 2.0.0?
From what I just saw, handlebars 2.0.0 works just well when I update the version in the grunt-contrib-handlebars package.json.

I assume this is old news to you guys, but I just stumbled here after trying to upgrade my bpwer.json to use 2.0 for my client side templates (backbone)

Uncaught Error: Unknown template object: function 

is printed when I load, so I'm interested in knowing why if someone can fill me in.

If I remember correctly, that is because of the change in this function here: https://github.com/wycats/handlebars.js/blob/master/lib/handlebars/runtime.js#L25

Same with me when precompiling using grunt and then using runtime 2.0

Wasgetting Uncaught Error: Unknown template object: function

downgraded to handlebars runtime 1.3.0 and fixes this issue.

+1 for the "Unknown template object" error here too. I tried updating my local handlebars inside grunt-contrib-handlebars, using npm-check-updates, but it didn't fix things. Like @FranckErnewein, I downgraded my client-side library to get things working.

yoko commented

+1

in v0.9.0

Thank you guys!

Now it works fine with grunt-browserify and Handlebars 2.
Thank you 👍

Can you please, please Upgrade this so it handlebars dependency is version 4.

^+1 Support for handlebars 4 would be great

+1 on support for handlebars 4.