SparkPost / mandrill-sparkpost-templates

Translate Mandrill Handlebars templates into SparkPost templates
https://www.sparkpost.com/blog/mandrill-template-migration-tool-mst3k/
Other
6 stars 3 forks source link

Render SparkPost templates locally #13

Closed generalov closed 8 years ago

generalov commented 8 years ago

Hi! We are using handlebars template engine to render Mandrill's templates locally because them templates just the handlebars. :) It helps our in writing unit tests and documentation.

We would like to use SparkPost. Unit tests could help. But SparkPost templates has differences and handlebars throws syntax errors on {{each}} {{if }} and etc. instrutions.

Is it possbile to render SparkPost templates locally? I've looked for some documentation, library or may be handlebars configuration, but found nothing yet.

ewandennis commented 8 years ago

Thats a good question. SparkPost's template language isn't open source today (but I'll certainly feed that back). If you don't mind making REST API calls in your test suite, you can use the SparkPost API templates endpoint to create and then preview a template.