Coracle generator
Scaffold a project in 1 minute
Some command maybe need authority, please use sudo
.
Install
npm install -g yo gulp generator-coracle
Usage
1. Create the project directory
mkdir my_app
2. Run the generator
cd my_appyo coracle
Be patient.. this may take a few minutes. If throw some Error when install npm package,you can do it by yourself:
npm install
3. config
write config.js for your project
4. Build
gulp build
5. Run your app
Start a development web server, start Weinre, and watch for changes
gulp
gulp build
will auto run when use this task,and watch file to livereload.
6. zip your app
Conpress zip files for your project module
gulp zip
7. upload your module to xSimple
gulp upload
use up
or down
move,space
to select,enter
to commit.
warning
Every module should have a .js
,.html
,.css
,.less
file.Otherwise gulp build
will not make a folder for this module.Then gulp upload
will throw a error.
License
GPL
========================中文文档========================
Coracle generator
一分钟构建项目
一些命令可能需要权限请使用sudo
.
安装指令
npm install -g yo gulp generator-coracle
用户操作
创建一个目录
指令
mkdir my_app
运行自定义yeoman模板
指令
cd my_appyo coracle
需要一点时间等待安装成功! 如果安装npm依赖包时报错,你可以自己手动安装
npm install
3. 配置
config.js 为项目的配置文件
4.构建初始化
指令
gulp build
5. 发布 运行 app 目录下的web文件
默认使用本地ip 端口默认8000 指令
gulp
gulp build
回在执行这个任务前自动调用.同时监视本地文件变化自动同步刷新页面。
6. 压缩发布的app目录的文件夹
指令
gulp zip
7. 对应模块上传 xSimple
指令
gulp upload
键盘上下选择模块 按空格表示是否选中 回车提交上传。
温馨提醒
每个模块中必须至少包含一个html,css,less,或者js 文件,否则gulp build
会生成一个空目录,gulp upload
会报错。
请按顺序操作 gulp build
先构建 才能使用 gulp upload
否则上传会找不到文件报错!
协议
GPL