e b35547e141 index %!s(int64=9) %!d(string=hai) anos
..
js b35547e141 index %!s(int64=9) %!d(string=hai) anos
test-all b35547e141 index %!s(int64=9) %!d(string=hai) anos
tpl b35547e141 index %!s(int64=9) %!d(string=hai) anos
README.md b35547e141 index %!s(int64=9) %!d(string=hai) anos
index.html b35547e141 index %!s(int64=9) %!d(string=hai) anos
requirejs.html b35547e141 index %!s(int64=9) %!d(string=hai) anos
seajs.html b35547e141 index %!s(int64=9) %!d(string=hai) anos
templatejs.html b35547e141 index %!s(int64=9) %!d(string=hai) anos

README.md

TmodJS-运行测试例子

切换到当前目录,执行 tmod 命令

$ cd tmodjs/test/tpl
$ tmod

如果终端返回如下信息,表示模板已经编译完成

./copyright.html √
./index.html √
./public/footer.html √
./public/header.html √
./public/logo.html √

在浏览器中加载模板

模板经过编译后,支持普通脚本引入与 SeaJS 、RequireJS 等模块管理器调用。

在 NodeJS 中加载模板

运行示例:

$ node node.js