Code Monkey home page Code Monkey logo

eros-cli's Introduction

eros-cli

A simple CLI for scaffolding weex projects, we provide eros-template to quickly build small and medium sized app.

Installation

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

Usage

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.

Command

build:

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

dev:

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

init:

generate eros-template in current execution directory, you can quickly build your app through it.

$ eros init

install

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

pack

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

update

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

mock

start mock server, you can change default proxy and mockServer in eros-template/config/eros.dev.js.

$ eros mock

Develop & Test

  • 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

eros-cli's People

Contributors

perseverancez avatar shawn-tangsc avatar

Watchers

James Cloos avatar zhangjanp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.