template project generator.
Quick Start
Create the app:
$ npm install -g jdtpl-generator
use example:
$ tpl -s 300/200 -m $ tpl -h Usage: tpl [options] <pra ...> Options: -h, --help output usage information -V, --version output the version number -s, --size [width/height] 设置广告位生成的高宽 -n, --name [value] 设置项目名称,默认为template -p, --path 在当前目录下生成项目 -j, --less [jdAd320-250|.....] 手动选择样式 -f, --force 强制覆盖非空目录 -t, --theme [normal|adx] 设置样式主题 -m, --mobile 使用移动端的脚本和样式 -a, --author [value] 设置备注信息,如作者之类 -l, --list 列出所有样式
tpl -s 500/300 -t adx -a 增加全球购标签 -m
生成 宽高为500,300的模板项目, adx主题样式(默认配置,可不写),备注为增加全球购标签, 使用移动端样式和脚本
tpl -s jdAd644-90
使用jdAd644-90.less生产css;
共jdAd320-250|jdAd200-300|jdAd644-90|jdAd1000-90|jdAd320-80|jdAd160-600|jdAd200-200
七种样式
tpl -p 在当前文件夹下生成项目
默认在当前文件夹下建立新的项目
tpl -f
强制覆盖原来的文件
生成模板项目后的使用
- 首先安装grunt插件
npm install
- 运行grunt
grunt dev //生成开发环境下的文件,可以插入测试数据直接调试,使用生成的本地脚本和样式文件
grunt proc //生成生成环境的文件,文件位于dist/html中
- 发布 grunt publish:id