A simple CLI for scaffolding weex projects, we provide eros-template to quickly build small and medium sized app.
Prerequisites: Node.js (>=4.x, 6.x preferred), npm version 3+ and Git.
$ npm install -g eros-cli
If you were in China, we recommand you install cnpm before.
$ cnpm install -g eros-cli
You can code eros -h
to show a profile.
eros-cli:
The following instructions are provided to help you build app !
build | build for eros project.
dev | start dev server.
init | generate eros template.
install | install eros platform and components' librarys.
pack | pack full dose zip and send to eros platform project.
update | update eros-template file by path.
mock | start a mock server.
eros cli build prod's full zip, contain js bundle, assets/images and iconfont.
$ eros build
build full zip and copy to specified path, post full zip info to your server, you can use eros-publish for collocation.
$ eros build -s url
build full zip and copy to specified path, generate full zip and diff zip in eros-template's dist folder.
$ eros build -d
build full zip and copy to specified path, generate full zip and diff zip in eros-template's dist folder, post full zip info to your server at same time.
$ eros build -s url -d
start dev server, you can change default server.path
and server.port
in eros-template/config/eros.dev.js
, eros' app can refresh current view when your local code is changed and saved, You can debug by forward agent software in real machine.
forward agent software recommand:
- windows: fidder
- ios: charles
$ eros dev
generate eros-template in current execution directory, you can quickly build your app through it.
$ eros init
eros developed many functions based on weex (self-module), you don't have to worry about the version of the weex update, we will update weex in time, every time we have a change ( new module / bugfix / weex update and so on), you can install them to use it.
$ eros install
install eros ios sdk.
$ eros install ios
install eros android sdk.
$ eros install android
install both sdk.
$ eros install all
build prod's full zip and send it to platforms's ios/android built-in package storage path.
$ eros pack
pack eros ios inner js bundle.
$ eros pack ios
pack eros android inner js bundle.
$ eros pack android
pack eros ios && android inner js bundle.
$ eros pack all
you can update eros-template's every file/path when eros-template has updated, but your must use it be careful, when the file/path has be changed by yourself that you want to update
.
$ eros update
update eros ios sdk.
$ eros update ios
update eros android sdk.
$ eros update android
update template by path.
$ eros update template path
start mock server, you can change default proxy
and mockServer
in eros-template/config/eros.dev.js
.
$ eros mock
- cd eros-template or eros init project
parent directory
. - git clone https://github.com/bmfe/eros-cli
- cd eros-cli && git checkout dev
- npm/cnpm i
- cd eros-template or eros init project
- node ../eros-cli/bin/eros.js + command
- [bugfix] remove eros pack android umeng appid.
- [bugfix] jsServer undefined when packing inner zip.
- [remove] eros install.
- [remove] eros update ios/android (eros update tempate still in there).
- [bugfix] ip.txt send to template.
- [bugfix] newPack.config.js -> newpack.config.js.
- [bugfix] gulp in not deined.
- [bugfix] cannot find module.
- [bugfix] sass less stylus not effect.
- [feature] add socketServer.
- [feature] add
$ eros config reload
. - [feature] eros init support choose pure template.
- [optimize] change babel to happypack.
- [optimize] make process.env.NODE_ENV customizable.
- [bugfix] weex-loader down to 0.5.2.
- [feature] update
weex-loader
to newest,supportrecyle-list
. - [feature] add socket server, start to develop save auto refresh.
- [bugfix] eros build -d report wrong info.
- [bugfix] eros pack and eros build generate different zip.
- [bugfix] eros dev not add app board file.
- [optimize] support weex debug.
- [feature] add eros run ios.
- cli[add]: eros install all 可同时下载两端的 eros-sdk
- cli[add]: 支持在 init 的时候输入安卓的包名
- cli[fix]: eros mock 报错问题
- cli[mod]: eros cli 的帮助日志更新
- cli[del]: 由于 widget 已提交到 npm 上,目录下不在存在 widget,所以去掉 eros update widget 指令
- fix: eros pack all 失效问题
- fix: eros pack ios 失效问题
- fix: eros pack android 失效问题
- add: eros pack all
- add: eros pack ios
- add: eros pack android
- add: eros install ios
- add: eros install android
- add: eros update ios
- add: eros update android
- add: eros update template your_path
- add: eros update widget
- fix: eros build 会打内置包的情况
- add: eros pack --all 同时打两端的内置包
- 添加 eslint 编译
- 修复 windows 上报打包解析错误的bug
- eros pack 没有打包本地静态资源
- eros pack 没有打包本地静态资源
- eros pack 没有打包本地静态资源
- fix 脚手架 dev 报错的问题
- 删除组件更新
- bugfix: 修复 eros init 报错的问题
- 脚手架更新: 加密算法
- 脚手架更新: 添加tree-shaking
- 脚手架更新: 精简体积,删除无用代码
- 脚手架更新: eros update 可选择不再覆盖
- pack 动态给安卓添加配置信息。
- 优化差分包逻辑,增加webpack输出提示。
- 新增eros update
- add eros init
- add eros build
- add eros dev
- add eros pack (--ios/android)
- add eros install (--ios/android)
- 兼容 windows
- minWeex 打包问题
- 打包js的时候 混淆会顺便删除map文件减少体积
- iconfont 打包路径问题
- 修改 eros NODE_env 搭配修复eros debug问题
- fix diff bug
- build assets 时候多调用了打 iconfont md5 方法