sea.js 模板生成工具
install
npm install -g tbj-cli
exec
tbj-new - #根据步骤提示生成所需要的目录 tbj-new #默认生成方式
目录结构:
demo # 工程名| |--- src # 源码目录 | | |---- page # 所有页面脚本和样式文件 | | | |--- hello # hellohtml 相关js和css及区域模块代码| | | | |---indexjs|indexcoffee # 主入口文件| | | | |---indexcss|indexstyl # 主样式文件| | | | |---mods # hellohtml拆分的一些模块代码| | | | | |---indexcoffee| | | | | |---indexstyl | | | | | |---indexjade| | | |-- common # 所有页面依赖的公共业务组件| | | | |----dialogbank| | | | | |---indexjs | | | | | |---indexcss | | | | | |---indextpl| | | | |---- ...... | |---- html # 工程下的所有html 页面| | |---- hellohtml| |---- doc # 文档 | |---- packagejson # 依赖包配置 | |---- READMEmd # 默认文档| |---- gulpfilejs # gulp打包时使用的配置信息| |---- build # 上线目录
打包运行:
gulp
开发阶段开启文件实时编译:
gulp watch