发布于 2015-09-02 04:26:56 | 374 次阅读 | 评论: 0 | 来源: 网友投递
Handlebars.js JS模板引擎
Handlebars是一个Javascript模板引擎,能让你轻松高效的编写语义化模板,它是Mustache模板引擎的一个扩展,Handlebars和Mustache都是弱逻辑的模板引擎,能将Web前端的视图和代码分离,降低两者之间耦合。
Handlebars.js 4.0.0 发布,此版本更新内容如下:
#1087 - Fix #each when last object entry has empty key (@denniskuczynski)
#1084 - Bump uglify version to fix vulnerability (@John-Steidley)
#1037 - Fix minor typos in README (@tomxtobin)
#1032 - Is it possible to render a partial without the parent scope? (@aputinski)
#1016 - Version mis-match (@mayankdedhia)
#1023 - is it possible for nested custom helpers to communicate between each other?
#893 - [Proposal] Section blocks.
#792 - feature request: inline partial definitions
#583 - Parent path continues to drill down depth with multiple conditionals
#404 - Add named child helpers that can be referenced by block helpers
Escape = in HTML content - 83b8e84
Drop AST constructors in favor of JSON - 95d84ba
Pass container rather than exec as context - 9a2d1d6
Add ignoreStandalone compiler option - ea3a5a1
Ignore empty when iterating on sparse arrays - 06d515a
Add support for string and stdin precompilation - 0de8dac
Simplify object assignment generation logic - 77e6bfc
Bulletproof AST.helpers.helperExpression - 93b0760
Always return string responses - 8e868ab
Pass undefined fields to helpers in strict mode - 5d4b8da
Avoid depth creation when context remains the same - 279e038
Improve logging API - 9a49d35
Fix with operator in no @data mode - 231a8d7
Allow empty key name in each iteration - 1bb640b
Add with block parameter support - 2a85106
Fix escaping of non-javascript identifiers - 410141c
Fix location information for programs - 93faffa
下载:https://github.com/wycats/handlebars.js/archive/v4.0.0.zip。
Handlebars.js 是一个 JavaScript 的页面模板库