1.0.8 • Published 5 years ago
create-seajs-template v1.0.8
快速构建seajs项目
一、安装
npm install create-seajs-template -g
二、创建工程
create-seajs-template -c 【projectname】
三、安装依赖
cd 【projectname】
npm install
四、项目打包
使用的是gulp打包工具,生成dist目录内容放在服务器web目录下。
cd 【projectname】 gulp
五、项目结构
|-config
|----config // 项目配置文件(seajs和自定义配置)
|-images // 静态图片资源文件(执行gulp图片会自动压缩)
|-libs // 第三方JS库
|----sea.js
|----swiper.min.js
|----vconsole.min.js
|----zepto.min.js
|-scripts // 业务脚本
|----app.js // 项目入口文件
|----test.js // 其他业务脚本
|-utils // 工具库
|----date.js // 时间处理工具
|-gulpfile.js // 打包配置文件
|-index.html // 静态页面
|-package.json // 包管理