How can I convert my templates from mustache to handlebars?

900 Views Asked by At

I have templates that are mustache files that need to be converted to handlebars. From doing research it looks like handlebars supports a lot but not all of the mustache functionality. Are there any tools that will allow me to automate this conversion?

I am using these specific implementations of those templates:

1

There are 1 best solutions below

0
On BEST ANSWER

One can automate converting mustache templates to handlebars templates with this python mustache_to_handlebars tool: https://github.com/spacether/mustache_to_handlebars

One key differences is:

  • #someTag in mustache covers these 3 use cases in handlebars: #if or #each or #with

And you can call it like: mustache_to_handlebars path_containing_mustache_files