Este sitio web funciona mejor con JavaScript.
Inicio
Explorar
Ayuda
Iniciar sesión
jan
/
mustache.js
réplica de
https://github.com/janl/mustache.js
Seguir
1
Destacar
0
Fork
0
Código
Incidencias
0
Lanzamientos
46
Wiki
Actividad
Explorar el Código
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
hace 6 años
padre
51bd7fd494
commit
4221728e6f
Se han
modificado 3 ficheros
con
10 adiciones
y
0 borrados
Dividir vista
Opciones de diferencias
Mostrar estadísticas
Descargar archivo de parche
Descargar archivo de diferencias
+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
Ver fichero
@@ -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
Ver fichero
@@ -0,0 +1 @@
{{#bold}}Hi {{name}}.{{/bold}}
+ 1
- 0
test/_files/cli_js_view_with_function.txt
Ver fichero
@@ -0,0 +1 @@
<b>Hi Tater.</b>
Escribir
Vista previa
Cargando…
Cancelar
Guardar