0.1.6 • Published 7 years ago
tbj-cli v0.1.6
sea.js 模板生成工具
install
npm install -g tbj-cli
exec
tbj-new -s (tbj new -s) #根据步骤提示生成所需要的目录
tbj-new #默认生成方式
目录结构:
demo # 工程名
| |--- src # 源码目录
| | |---- page # 所有页面脚本和样式文件
| | | |--- hello # hello.html 相关js和css及区域模块代码
| | | | |---index.js|index.coffee # 主入口文件
| | | | |---index.css|index.styl # 主样式文件
| | | | |---mods # hello.html拆分的一些模块代码
| | | | | |---index.coffee
| | | | | |---index.styl
| | | | | |---index.jade
| | | |-- common # 所有页面依赖的公共业务组件
| | | | |----dialogbank
| | | | | |---index.js
| | | | | |---index.css
| | | | | |---index.tpl
| | | | |---- .......
| |---- html # 工程下的所有html 页面
| | |---- hello.html
| |---- doc # 文档
| |---- package.json # 依赖包配置
| |---- README.md # 默认文档
| |---- gulpfile.js # gulp打包时使用的配置信息
| |---- build # 上线目录
打包运行:
gulp
开发阶段开启文件实时编译:
gulp watch