前端有什么模板引擎推荐

我现在基本靠gulp来进行开发,之前用过gulp-fileinclude从功能上来将够用,但是语法不太友好,也没有好的格式化和高亮插件,现在转战EJS了,发现他的传参只能通过渲染的时候传参,include的时候是无法传的,那对于我来说太不方便了,所以有什么能够配合Gulp使用的前端模板引擎吗?

其实我只需要基本 传参字符替换 循环 if判断 就够了,最后能通过gulp生成普通的HTML就可以

阅读 8.2k
3 个回答

clipboard.png

各个模板引擎下载地址

baiduTemplate: http://baidufe.github.io/Baid...

artTemplate: https://github.com/aui/artTem...

juicer: http://juicer.name/或https://github.com/PaulGuo/Juicer/zipball/master#download

doT:doT source:https://github.com/olado/doT Docs:http://olado.github.com/doT/

tmpl:https://github.com/BorisMoore...

handlebars:http://handlebarsjs.com/或https://raw.github.com/wycats/handlebars.js/1.0.0-rc.4/dist/handlebars.js

easyTemplate:https://github.com/qitupstudi...

underscoretemplate: http://documentcloud.github.i...

mustache:https://github.com/janl/musta...

kissytemplate:https://github.com/ktmud/kissy

BaiduTemplate、artTemplate

Handlebars React

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进