【文件属性】:
文件名称:velocity:A node velocity template engine. Node 版 velocity 模板引擎
文件大小:89KB
文件格式:ZIP
更新时间:2021-05-11 18:48:00
JavaScript
速度
节点速度模板引擎。
Node Edition速度模板引擎。
0.特点
完全实现了速度语法。
查看模板依赖性。
从模板中提取数据结构。
生成中间模板以转储上下文。
1.分期付款
$ npm install velocity -g
2.快速入门
一些示例已为您准备好:
$ git clone https://github.com/fool2fish/velocity.git
$ cd examples
尝试一个简单的
命令:
$ cd hello
$ velocity
输出:
Hello, velocity!
更多例子
方法查询
查看依赖
从模板中提取数据结构
生成中间模板以转储上下文
查看所有示例。
3.在模块中使用
渲染模板
var Engine = require('velocity').Engine
var engine = new Engine( {{op
【文件预览】:
velocity-master
----.jshintrc(6KB)
----.gitignore(104B)
----package.json(998B)
----Makefile(756B)
----History.md(539B)
----bin()
--------velocity(2KB)
----.travis.yml(219B)
----index.js(34B)
----examples()
--------data-structure-method()
--------method-lookup()
--------errors()
--------directive()
--------reference()
--------hello()
--------data-dump()
--------data-dump-method()
--------macro()
--------dependency()
--------expression()
--------parse()
--------data-structure()
----.jshintignore(30B)
----README.md(4KB)
----lib()
--------data()
--------common.js(4KB)
--------index.js(142B)
--------engine()
--------logger.js(755B)
--------handle-cfg.js(1KB)
--------dep()
----.npmignore(78B)
----docs()
--------grammar.md(634B)
--------differ-from-java-edition.md(2KB)
----AUTHORS(329B)
----test()
--------parser.test.js(23KB)
--------engine.test.js(2KB)
--------utils.js(426B)
--------fixtures()