瀏覽代碼

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 年之前
父節點
當前提交
4221728e6f
共有 3 個文件被更改,包括 10 次插入0 次删除
  1. +8
    -0
      test/_files/cli_js_view_with_function.js
  2. +1
    -0
      test/_files/cli_js_view_with_function.mustache
  3. +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>

Loading…
取消
儲存