Пожалуйста, включите JavaScript.
Главная
Обзор
Помощь
Вход
jan
/
mustache.js
зеркало из
https://github.com/janl/mustache.js
Следить
1
В избранное
0
Форкнуть
0
Код
Задачи
0
Релизы
46
Вики
Активность
Просмотр исходного кода
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
Сommit
4221728e6f
3 измененных файлов
:
10 добавлений
и
0 удалений
Единый вид
Опции Diff
Показать статистику
Скачать Patch файл
Скачать Diff файл
+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>
Редактирование
Предпросмотр
Загрузка…
Отмена
Сохранить