0.0.28 • Published 7 years ago
zeta-renderer v0.0.28
zeta-renderer@0.0.13
安装
$ npm install -g zeta-renderer
使用
在编译后的工程根目录下执行:
$ renderer -p 8083 my_config.json
在package.json的dependencies中增加"zeta-renderer": "latest"
var renderer = require("zeta-renderer");
renderer({port:8083, configFilePath:"my_config.json"});
renderer.config; //返回配置
其中的选项: 1. port: 端口号 8080; 2. filesHome: 编译后的文件夹名 "public"; 3. dataFiles: 数据文件路径 []; 4. extraHelpers: 自定义help文件路径 []; 5. assetsPrefix: filesHome目录下的文件路径 void 0; 6. user: 用户数据,用于注入USER void 0; 7. configFilePath: 根目录下配置文件 "renderer.json"; 8. indexView: 默认的页面view "index".
配置内容优先级
默认配置 < 调用参数/命令行 < 配置文件
helper
ifCond
size
返回数组的大小json
将对象以json
格式返回mod
是否整除neither
两个非and
两个是gt
大于equals
相等add
两个数字相加of
参数一在数组二中formatDate
将long
格式的时间以YYYY-MM-DD HH:mm:ss
格式返回formatPrice
将分为单位的金额以xx.xx
格式返回assign
在上下文定义一个变量markdown
引入.md文件inject
引入.hbs文件
0.0.28
7 years ago
0.0.27
7 years ago
0.0.26
7 years ago
0.0.25
7 years ago
0.0.24
7 years ago
0.0.23
7 years ago
0.0.22
7 years ago
0.0.20
7 years ago
0.0.19
7 years ago
0.0.18
7 years ago
0.0.17
7 years ago
0.0.16
7 years ago
0.0.15
7 years ago
0.0.14
8 years ago
0.0.13
8 years ago
0.0.12
8 years ago
0.0.11
8 years ago
0.0.10
8 years ago
0.0.9
8 years ago
0.0.8
8 years ago
0.0.7
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago