# gt-dva-cli

> The dva command line utility.

Latest version **0.0.16** (published 2022-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install gt-dva-cli
pnpm add gt-dva-cli
yarn add gt-dva-cli
bun add gt-dva-cli
```

Provides the command `dva`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.16 |
| Published | 2022-10-25 |
| First published | 2022-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 932.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | chnrat |

## Links

- npm: https://www.npmjs.com/package/gt-dva-cli
- Repository: https://github.com/chnrat/dva-cli
- Homepage: https://github.com/chnrat/dva-cli.git
- Issues: https://github.com/chnrat/dva-cli/issues
- npm.io page: https://npm.io/package/gt-dva-cli

## Dependencies (14)

- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [which](https://npm.io/package/which.md) ^1.2.10
- [dva-ast](https://npm.io/package/dva-ast.md) ^0.3.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.30.0
- [inquirer](https://npm.io/package/inquirer.md) ^6.2.1
- [left-pad](https://npm.io/package/left-pad.md) ^1.1.3
- [through2](https://npm.io/package/through2.md) ^2.0.1
- [vinyl-fs](https://npm.io/package/vinyl-fs.md) ^2.4.3
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [empty-dir](https://npm.io/package/empty-dir.md) ^0.2.1
- [win-spawn](https://npm.io/package/win-spawn.md) ^2.0.0
- [path-exists](https://npm.io/package/path-exists.md) ^3.0.0
- [update-notifier](https://npm.io/package/update-notifier.md) ^2.3.0
- [simple-uppercamelcase](https://npm.io/package/simple-uppercamelcase.md) ^1.0.0

## Recent versions

- 0.0.16 (latest) — 2022-10-25
- 0.0.15 — 2022-09-18
- 0.0.14 — 2022-09-08
- 0.0.13 — 2022-09-08
- 0.0.12 — 2022-09-08
- 0.0.11 — 2022-09-08
- 0.0.9 — 2022-09-08
- 0.0.8 — 2022-09-08
- 0.0.7 — 2022-09-08
- 0.0.6 — 2022-09-03
- 0.0.5 — 2022-09-03
- 0.0.4 — 2022-08-31
- 0.0.3 — 2022-08-31
- 0.0.2 — 2022-08-31
- 0.0.1 — 2022-08-31

## README

# gt-dva-cli

[![NPM version](https://img.shields.io/npm/v/gt-dva-cli.svg?style=flat)](https://npmjs.org/package/gt-dva-cli)
[![NPM downloads](http://img.shields.io/npm/dm/gt-dva-cli.svg?style=flat)](https://npmjs.org/package/gt-dva-cli)

CLI for [dva](https://github.com/dvajs/dva) .
---
## Getting Started

Install, create and start.

```bash
# 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 <appName> [options]

Create app with new directory.

#### Usage Examples

```bash
$ 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

```bash
.
├── 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](https://github.com/sorrycc/roadhog) for build and server, view [roadhog#Configuration](https://github.com/sorrycc/roadhog/blob/master/README.md#configuration) ([中文版](https://github.com/sorrycc/roadhog/blob/master/README_zh-cn.md#配置)) for details.

## License

[MIT](https://tldrlegal.com/license/mit-license)

---
_Source: https://npm.io/package/gt-dva-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
