# html5-template
**Repository Path**: xu138/html5-template
## Basic Information
- **Project Name**: html5-template
- **Description**: 移动端小项目模板
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-04
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## APP多页面简易脚手架
#### 项目组织方式
- `index.html`为项目启动页面,相关脚本和样式请放于`views/index/index.js`和`views/index/index.css`文件中
- 全局配置请放入`conf/app.js`文件中
- 全局样式请放入`conf/app.css`文件中
- 服务定义请放入`conf/service.js`文件中
- 辅助工具请放入`utils`目录下
- 功能模块请放于`views`目录下的一级或二级目录中(不支持三级目录)
- 编译声明请使用` `格式,勿随意修改
- 资源引用请使用`url('something-here')`格式,勿随意修改
#### 内置命令
- `npm run build`,上线打包使用编译项目不带hash
- `npm run dev`,开发中监听并编译项目不带hash
- `npm run hashBuild`,编译项目带hash 上线打包使用
- `npm run devHash`,开发中监听并编译项目不带hash
- `npm run serve`,在编译后的项目中启动服务
#### 命令行参数
- `gulp new --layer value(layer1[,layer2])`,使用`views/template`模板创建新的模块,`layer1`为目录名,`layer2`为模块名,缺省规则为`layer2=layer1='layer'`
- `gulp --rem value(rootValue)`,设置`rem`基础值,`rootValue`为基础值
- `gulp --filter value(file1[,file2,...])`,设置无需`hash`的文件,`file1/file2`为文件名
- 如果新增页面实例:修改package.json `${scripts > new }` 方法后面 `wares` 名称为 `自己页面名称` 运行 `npm run new` 即可在views 文件夹查看新建好的页面