0.0.16 • Published 2 years ago

gt-dva-cli v0.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

gt-dva-cli

NPM version NPM downloads

CLI for dva .

Getting Started

Install, create and start.

# Install
$ npm install gt-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
    ├── constants.js          # Constants file
    ├── index.css          # CSS for entry file
    ├── index.ejs          # Template 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          #
├── .gitignore             #
├── .webpackrc.js             # webpack config
└── package.json           #

Configuration

gt-dva-cli use roadhog for build and server, view roadhog#Configuration (中文版) for details.

License

MIT

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago