This website works better with JavaScript.
Начало
Каталог
Помощ
Вход
jan
/
mustache.js
огледало от
https://github.com/janl/mustache.js
Наблюдаван
1
Харесван
0
Разклонения
0
Код
Задачи
0
Версии
46
Уики
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…
Отказ
Запис