This website works better with JavaScript.
首頁
探索
說明
登入
jan
/
mustache.js
镜像来自
https://github.com/janl/mustache.js
關註
1
收藏
0
複製
0
程式碼
問題管理
0
版本發佈
46
Wiki
Activity
瀏覽代碼
Test view with functions from cli
Tests
#717
for cli which allows use of functions in a view which is exported javascript.
pull/717/head
Justin Staubach
6 年之前
父節點
51bd7fd494
當前提交
4221728e6f
共有
3 個文件被更改
,包括
10 次插入
和
0 次删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-0
test/_files/cli_js_view_with_function.js
+1
-0
test/_files/cli_js_view_with_function.mustache
+1
-0
test/_files/cli_js_view_with_function.txt
+ 8
- 0
test/_files/cli_js_view_with_function.js
查看文件
@@ -0,0 +1,8 @@
module.exports = {
'name': 'Tater',
'bold': function () {
return function (text, render) {
return '<b>' + render(text) + '</b>';
};
}
};
+ 1
- 0
test/_files/cli_js_view_with_function.mustache
查看文件
@@ -0,0 +1 @@
{{#bold}}Hi {{name}}.{{/bold}}
+ 1
- 0
test/_files/cli_js_view_with_function.txt
查看文件
@@ -0,0 +1 @@
<b>Hi Tater.</b>
Write
Preview
Loading…
取消
儲存