mustachio icon indicating copy to clipboard operation
mustachio copied to clipboard

Grunt task to render Mustachio templates

Open hardingmatt opened this issue 4 years ago • 1 comments

My team uses MailMason and Postmark, to manage all our transactional email templates.

Request:

I would like to have a grunt task that takes my generated .html Mustachio templates, and renders them with a variables file, e.g. variables.json.

This functionality exists for both Handlebars (grunt-compile-handlebars) and Mustache (grunt-mustache-render). But I can't seem to find a prebuilt way to do this for Mustachio.

My use case:

  • I start with .hbs files, then automatically generate the .html/.txt templates, then test them manually in the Postmark console with predefined variables, then upload them from the command line.
  • Instead of the manual step, I would like to automatically send myself the generated emails, with all the sample variable values filled in.

I would suspect other Postmark customers have this same use case. Can you please let me know if a solution already exists for this? Sorry if a Github Issue was not the right way to handle this request. Thanks! 🙌

hardingmatt avatar Oct 01 '19 22:10 hardingmatt

+1. We've just integrated MailMason and it's a little weird to not have a Grunt task for this 🤔 Or some way to render Mustachio templates after the Handlebars is compiled.

iampava avatar Jul 15 '21 12:07 iampava