Il sito funziona meglio con JavaScript.
Home
Esplora
Aiuto
Accedi
jan
/
mustache.js
mirror da
https://github.com/janl/mustache.js
Segui
1
Vota
0
Forka
0
Codice
Problemi
0
Rilasci
46
Wiki
Attività
Sfoglia il codice sorgente
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 anni fa
parent
51bd7fd494
commit
4221728e6f
3 ha cambiato i file
con
10 aggiunte
e
0 eliminazioni
Visualizzazione separata
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
Vedi File
@@ -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
Vedi File
@@ -0,0 +1 @@
{{#bold}}Hi {{name}}.{{/bold}}
+ 1
- 0
test/_files/cli_js_view_with_function.txt
Vedi File
@@ -0,0 +1 @@
<b>Hi Tater.</b>
Write
Preview
Loading…
Annulla
Salva