0.0.28 • Published 8 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
ifCondsize返回数组的大小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
8 years ago
0.0.27
8 years ago
0.0.26
9 years ago
0.0.25
9 years ago
0.0.24
9 years ago
0.0.23
9 years ago
0.0.22
9 years ago
0.0.20
9 years ago
0.0.19
9 years ago
0.0.18
9 years ago
0.0.17
9 years ago
0.0.16
9 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
9 years ago
0.0.9
9 years ago
0.0.8
9 years ago
0.0.7
9 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago