简体   繁体   中英

How can I convert my templates from mustache to handlebars?

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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM