anima-boilerplate
是面向移动端H5开发的项目结构最佳实践。
包含以下特性:
npm
、webpack
、babel
、ES2015
、less
├── README.md
├── package.json
├── src // 项目源码
├── test // 测试代码目录
└── webpack.config.js // webpack配置文件
├── common // 通用代码
│ ├── base.js // 基础的功能,可以包含`打点`、`监控`等功能
│ ├── base.less // 一些基础样式
│ ├── util.js // 一些通用的方法,
│ └── util.less // 基本的less工具,常见的`mixin`、`variable`
├── detail // 业务逻辑
│ ├── detail.html
│ ├── detail.js
│ └── detail.less
└── index // 首页业务
├── index.atpl
├── index.html // 访问入口
├── index.js
├── index.less
└── subIndex
项目ant-tool 作为开发工具,通过npm scripts
作为命令入口,如:
cnpm run start : 本地浏览器调试
cnpm run test : 本地跑单元测试
执行 npm run build
命令,会通过atool-build
打包出dist
目录。所有的代码都在里面