# ant-g

> antDesignPro辅助代码生成器

Latest version **0.9.10** (published 2020-01-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install ant-g
pnpm add ant-g
yarn add ant-g
bun add ant-g
```

Provides the command `ant-g`.

## 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.9.10 |
| Published | 2020-01-16 |
| First published | 2019-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 22 |
| Unpacked size | 97.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | fanhl [fanhl@189.cn] |
| Maintainers | fanhl |
| Keywords | antDesignPro, cli, antDesign, 脚手架 |

## Links

- npm: https://www.npmjs.com/package/ant-g
- Repository: https://github.com/fanhualei/ant-g
- Issues: https://github.com/fanhualei/ant-g/issues
- npm.io page: https://npm.io/package/ant-g

## Dependencies (22)

- [co](https://npm.io/package/co.md) ^4.6.0
- [glob](https://npm.io/package/glob.md) ^7.1.4
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [execa](https://npm.io/package/execa.md) ^1.0.0
- [fuzzy](https://npm.io/package/fuzzy.md) ^0.1.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [semver](https://npm.io/package/semver.md) ^6.1.0
- [ali-rds](https://npm.io/package/ali-rds.md) ^3.3.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^6.4.1
- [prettier](https://npm.io/package/prettier.md) 1.19.1
- [sylvanas](https://npm.io/package/sylvanas.md) ~0.2.0
- [umi-utils](https://npm.io/package/umi-utils.md) ^1.7.2
- [clipboardy](https://npm.io/package/clipboardy.md) ^2.1.0
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^10.0.3
- [yargs-parser](https://npm.io/package/yargs-parser.md) ^13.1.1
- [yeoman-generator](https://npm.io/package/yeoman-generator.md) ^4.0.1
- [sort-package-json](https://npm.io/package/sort-package-json.md) ^1.22.1
- [@babel/preset-typescript](https://npm.io/package/@babel/preset-typescript.md) ^7.7.7
- [inquirer-autocomplete-prompt](https://npm.io/package/inquirer-autocomplete-prompt.md) ^1.0.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.9.10 (latest) — 2020-01-16
- 0.9.9 — 2020-01-12
- 0.9.8 — 2020-01-09
- 0.9.7 — 2020-01-08
- 0.9.6 — 2020-01-07
- 0.9.5 — 2019-12-30
- 0.9.4 — 2019-12-30
- 0.9.3 — 2019-12-29
- 0.9.1 — 2019-12-28
- 0.9.0 — 2019-12-28

## README

# Cli for Ant Design Pro

Generate `service`   `mock`   ` page` according to the table of the database

- [x] generate service
- [x] generate  mock
- [x] generate  Page
- [x] auto modify menu and route
- [ ] generate   test


# 1. Install

```shell
npm i -g ant-g
```



# 2. Usage Example



## 2.1 Create Ant Design Pro

Create a new empty folder as project root. Execute command in the folder:

```shell
npm create umi
```

[*must select TypeScripte*](https://pro.ant.design/docs/getting-started) 



## 2.2 Use Ant-g

Execute command in the folder: `ant-g`

```shell
$ ant-g
? Select the boilerplate type (Use arrow keys)
> init                      - Create g-config.json config file for generator
  initDataStructure         - Create data structure file from database, this file save /.g
  dependencies              - Add dependencies to the project
  service                   - Create service and data.d from db
  mock                      - Create mock from db
  pageConfig                - Create page config file for generator page
  pageGenerate              - Create page from config file


```

[detail  manual-cn](doc/manual-cn.md)

# 3. FAQ



## 3.1 mysql connect



### 08004 error

error message

```
Client does not support authentication protocol requested by server; consider upgrading MySQL client
```



The reason is that the initial password of the database is not configured. Execute the following command on the MySQL command line:

```
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your password';
SELECT plugin FROM mysql.user WHERE User = 'root';
```









# 4. Change Logs


## 0.9.10

`2020-01-16`

* 🐞 fix searchForm date bug.


## 0.9.9

`2020-01-13`

* simple page template
    * ⚡ Promote  display and edit form by data type.
    

## 0.9.8

`2020-01-10`
* 🐞 fix searchForm.less missed bug.


## 0.9.7

`2020-01-10`
* ⚡ Added the function of configuring MySQL
* ⚡ Added shortcut command


## 0.9.6

`2020-01-02`
* ⚡ Add prettier module to prettier the code
* ⚡ Add generate page's code

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