gruntjs / grunt-contrib-handlebars

Precompile Handlebars templates to JST file.
http://gruntjs.com/
MIT License
282 stars 126 forks source link

Add support for Handlebars 3.x #136

Closed jacobq closed 9 years ago

jacobq commented 9 years ago

This plugin appears to be linked to Handlebars version ^2.0.0, but now version 3.0.0 has been released. When I tried to use this plugin with the latest Handlebars library I encountered an error when trying to render partials. It looks something like this: Uncaught TypeError: Cannot assign to read only property 'partial' of name-of-my-partial in the invokePartial function of Handlerbars 3.0.0:

        function invokePartial(partial, context, options) {
            options.partial = true;
            ...
timomayer commented 9 years ago

+1

saulhardman commented 9 years ago

+1

cagosto commented 9 years ago

+1

dougfarre commented 9 years ago

+1

AKhotoolev commented 9 years ago

+1 I found that updating dependency from 2.x to 3.x solves the problem

jacobq commented 9 years ago

@AKhotoolev, yes, that's the interim solution (e.g. fork the project and point at the new repo manually in package.json) but that's effectively monkey patching and isn't desirable in the long-term / for production software.

jd327 commented 9 years ago

+1

sgb-io commented 9 years ago

+1

craigweston commented 9 years ago

+1

johanpoirier commented 9 years ago

+1

jeremyhill-up commented 9 years ago

+1

mschoones commented 9 years ago

+1

kristofzerbe commented 9 years ago

+1 ... see https://github.com/wycats/handlebars.js/issues/969

stmpy commented 9 years ago

+1

vladikoff commented 9 years ago

For those who +1'd, see https://github.com/gruntjs/grunt-contrib-handlebars/pull/134

You can either use the PR or resubmit the PR with fixed tests (or at least something that is up to date with master)

joostory commented 9 years ago

138

themphill commented 9 years ago

@vladikoff Looks like you can close this now, as of https://github.com/gruntjs/grunt-contrib-handlebars/commit/9fa176ac6d23ed87746677016e7cac2974f10225.

Thanks, @joostory!