tj / consolidate.js

Template engine consolidation library for node.js
3.48k stars 357 forks source link

Fix mustache support #332

Closed vladimyr closed 4 years ago

vladimyr commented 4 years ago

Use mustache.render() instead of mustache.to_html() that got removed as of mustache v4 (https://github.com/janl/mustache.js/pull/735).

This closes #331

marinko-peso commented 4 years ago

@doowb any chance we can get this merged in and pushed to npm? Lib is effectively broken without this when people upgrade to latest mustache

doowb commented 4 years ago

@vladimyr thanks for the PR. I'll review this over the weekend.

vladimyr commented 4 years ago

Take your time 😉

marinko-peso commented 4 years ago

@doowb pinging so this doesn't get forgotten

marinko-peso commented 4 years ago

@doowb come out come out wherever you are 🤡

marinko-peso commented 4 years ago

For everyone wondering here, until this PR gets merged, you can fix it yourself for your project in a few easy steps. Go in node_modules (don't worry you will only do this once) and find consolidate/lib/consolidate.js, go to line 1043 (exports.mustache.render) and just change method to_html inside that block to render. After that run: npx patch-package consolidate This will figure out what changed and create a patch (make sure to add that to git!). As a dev dep install patch-package and make it run as a postinstall script in your package.json: "postinstall": "patch-package" Delete your node_modules and run a fresh npm install to see it in action. Patch will be run after install and update consolidate for you. When this gets merged and new version gets pushed to npm patch will let you know version changed and your patch might not be required anymore.

Hope it helps people!

vladimyr commented 4 years ago

@doowb Any news on this one?

vladimyr commented 4 years ago

Thank you!

vladimyr commented 4 years ago

@doowb Are there any plans for the new release?

jdauphant commented 4 years ago

Hey @tj , any plans for a release ? are you the only one that can do that ? (maybe you can give the push right for the npm package to someone invested like @doowb )