gruntjs/grunt-contrib-handlebars

Add support for Handlebars 3.x

Closed this issue · 17 comments

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;
            ...

+1

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

@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

+1

+1

stmpy commented

+1

For those who +1'd, see #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)

@vladikoff Looks like you can close this now, as of 9fa176a.

Thanks, @joostory!