2.0.8 • Published 5 years ago

oni-cli v2.0.8

Weekly downloads
30
License
MIT
Repository
github
Last release
5 years ago

this readme copy and edit for dva-cli this code copy and edit for umi

oni-cli

NPM version NPM downloads

CLI for dva umi.

update

2018.05.08

  • 1.use ejs
  • 2.change the app-structure like umi
  • 3.crate app (or mobile app) for Git clone
  • 4.the template managed to Git app mobile

2018.03.24

  • 1.update umi1.1
  • 2.add Nested Route

Getting Started

Install, create and start.

# Install
$ npm install oni-cli -g

# Create app
$ oni new myapp

# Start app
$ cd myapp
$ npm i 
$ npm start

Commands

We have 2 commands: new and generate(alias g).

oni new appName

Create app with new directory.

Usage Examples

$ oni new myapp

$ oni new myapp --mobile (or --web) ( create web app )

oni generate <?pagename> (short-cut alias: "g")

Generate page and component.

Usage Examples

$ oni g page home
#generate component '/src/pages/home/components/Table.js'
$ oni g component Table home  
#generate component '/src/components/Table.js'
$ oni g component Table 

Generated File Tree

.
├── mock                   # mock data
    ├── user.js            # the mock data test
├── public                 # index.html
├── src                    # Source directory
    ├── assets             # Store images, icons, ...
    ├── components         # UI components
    ├── layouts            # layouts
    ├── models             # Dva global models    
    ├── pages              # all pages (auto create Route)
    ├── plugins            # umi plugins
    ├── services           # Used for communicate with server
    └── utils              # Utils
        ├── request.js     # A util wrapped dva/fetch
        └── config.js      # global config (name,api...)
    
    ├── global.less        # global less
├── .editorconfig          #
├── .eslintrc              # Eslint config
├── .umirc.js              # umi
├── .umirc.mock.js         # umi mock
├── .webpackrc.js          # webpackrc extend(lick alias prexy)
├── .gitignore             #
└── package.json           #

Configuration

oni-cli use umi for build and server

License

MIT

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.7

6 years ago

1.0.6-1

6 years ago

1.0.5-1

6 years ago

1.0.5-rc.1

6 years ago

1.0.5

6 years ago

1.0.4-1

6 years ago

1.0.4

6 years ago

1.0.3-2

6 years ago

1.0.3-1

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0-rc.20

6 years ago

1.0.0-rc.19

6 years ago

1.0.0-rc.18

6 years ago

1.0.0-rc.17

6 years ago

1.0.0-rc.16

6 years ago

1.0.0-rc.15

6 years ago

1.0.0-rc.14

6 years ago

1.0.0-rc.13

6 years ago

1.0.0-rc.12

6 years ago

1.0.0-rc.11

6 years ago

1.0.0-rc.10

6 years ago

1.0.0-rc.9

6 years ago

1.0.0-rc.8

6 years ago

1.0.0-rc.7

6 years ago

1.0.0-rc.6

6 years ago

1.0.0-rc.5

6 years ago

1.0.0-rc.4

6 years ago

1.0.0-rc.3

6 years ago

1.0.0-rc.2

6 years ago

1.0.1-rc.1

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago