一覧へ戻る
dvajs/dva-cli(新しいタブで開きます)
主要言語: JavaScript
The dva command line utility.
- star 数
- 957
- watcher 数
- 33
- fork 数
- 153
- issue 数
- 67
- 最終更新
- 2019/03/17
主要言語: JavaScript
The dva command line utility.
CLI for dva .
📢 dva-cli is deprecated, please use create-umi instead, checkout Create a Project with create-umi for detail.
Install, create and start.
# Install $ npm install dva-cli -g # Create app $ dva new myapp # Start app $ cd myapp $ npm start
We have 2 commands: new, init.
Create app with new directory.
$ dva new myapp $ dva new myapp --demo $ dva new myapp --no-install
--demo -- Generate a dead simple project for quick prototype--no-install -- Disable npm install after files createdCreate app in current directory. It's options is the same as dva new.
. ├── 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 #
dva-cli use roadhog for build and server, view roadhog#Configuration (中文版) for details.