Home > Blockchain >  How can I convert my templates from mustache to handlebars?
How can I convert my templates from mustache to handlebars?

Time:10-19

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:

CodePudding user response:

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

  • Related