Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dvajs/dva-cli

Repository files navigation

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

About

The dva command line utility.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 9

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /