0.10.1 • Published 6 years ago

dva-cli v0.10.1

Weekly downloads
200
License
MIT
Repository
github
Last release
6 years ago

dva-cli

NPM version NPM downloads

CLI for dva .


šŸ“¢ dva-cli is deprecated, please use create-umi instead, checkout Create a Project with create-umi for detail.


Getting Started

Install, create and start.

# Install
$ npm install dva-cli -g

# Create app
$ dva new myapp

# Start app
$ cd myapp
$ npm start

Commands

We have 2 commands: new, init.

dva new options

Create app with new directory.

Usage Examples

$ dva new myapp
$ dva new myapp --demo
$ dva new myapp --no-install

options

  • --demo -- Generate a dead simple project for quick prototype
  • --no-install -- Disable npm install after files created

dva init options

Create app in current directory. It's options is the same as dva new.

Generated File Tree

.
ā”œā”€ā”€ src                    # Source directory
    ā”œā”€ā”€ assets             # Store images, icons, ...
    ā”œā”€ā”€ components         # UI components
    ā”œā”€ā”€ index.css          # CSS for entry file
    ā”œā”€ā”€ index.html         # HTML for entry file
    ā”œā”€ā”€ index.js           # Enry file
    ā”œā”€ā”€ models             # Dva models
    ā”œā”€ā”€ router.js          # Router configuration
    ā”œā”€ā”€ routes             # Route components
    ā”œā”€ā”€ services           # Used for communicate with server
    └── utils              # Utils
        └── request.js     # A util wrapped dva/fetch
ā”œā”€ā”€ .editorconfig          #
ā”œā”€ā”€ .eslintrc              # Eslint config
ā”œā”€ā”€ .gitignore             #
ā”œā”€ā”€ .roadhogrc             # Roadhog config
└── package.json           #

Configuration

dva-cli use roadhog for build and server, view roadhog#Configuration (äø­ę–‡ē‰ˆ) for details.

License

MIT

0.10.1

6 years ago

0.10.0

6 years ago

1.0.0-beta.4

7 years ago

1.0.0-beta.3

7 years ago

1.0.0-bea.2

7 years ago

1.0.0-bea.1

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago

0.8.2

8 years ago

0.8.1

8 years ago

0.8.0

8 years ago

0.7.10

8 years ago

0.7.9

8 years ago

0.7.8

8 years ago

0.7.7

8 years ago

0.7.6

8 years ago

0.7.5

8 years ago

0.7.4

8 years ago

0.7.3

8 years ago

0.7.2

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago

0.6.0

9 years ago

0.5.0

9 years ago

0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago