# init-hooks-src

> create react src template files with hooks version

Latest version **1.0.2** (published 2019-07-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install init-hooks-src
pnpm add init-hooks-src
yarn add init-hooks-src
bun add init-hooks-src
```

Provides the command `init-hooks-src`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-07-04 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | camiler |
| Maintainers | camiler |
| Keywords | react, template, hooks, cli |

## Links

- npm: https://www.npmjs.com/package/init-hooks-src
- Repository: https://github.com/camiler/init-hooks-src
- Homepage: https://github.com/camiler/init-hooks-src#readme
- Issues: https://github.com/camiler/init-hooks-src/issues
- npm.io page: https://npm.io/package/init-hooks-src

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^6.3.1
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.1.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2019-07-04
- 1.0.1 — 2019-05-29
- 1.0.0 — 2019-05-28

## README

## init-hooks-src

install using npm: 

`npm install --save-dev init-hooks-src`  

or yarn:   

`yarn add --dev init-hooks-src`   


Create a file with name is `menu.json` in the root directory of your project, like this: 
```
{
  "menu": ["example", "orderList", "dashboard", "home", "cashCar"]
}
```

then just: `init-hooks-src`

press enter to use default path './menu.json' and dist './src' or input dir to set path and dist

or 

`init-hooks-src --path ./menu1.json --dist ./src1`

Before run `init-hooks-src`, for example, your project structure may be like:
```
.
├── webpack.config.js
├── .gitignore
├── .babelrc
├── package.json
├── README.md
├── menu.json
```

After run `init-hooks-src`, it will help you make some containers and service api correspond to it, so the structure would be:
```
├── webpack.config.js
├── .gitignore
├── .babelrc
├── package.json
├── src
│   ├── container
│   │   ├── CashCar
│   │   │   ├── enum.js
│   │   │   └── index.js
│   │   ├── Dashboard
│   │   │   ├── enum.js
│   │   │   └── index.js
│   │   ├── Example
│   │   │   ├── enum.js
│   │   │   └── index.js
│   │   ├── Home
│   │   │   ├── enum.js
│   │   │   └── index.js
│   │   └── OrderList
│   │       ├── enum.js
│   │       └── index.js
│   ├── hooks
│   │   ├── useForceUpdate.js
│   │   └── useReactRouter.js
│   ├── index.js
│   ├── routes.js
│   ├── service
│   │   ├── api.js
│   │   ├── cashCar.js
│   │   ├── dashboard.js
│   │   ├── example.js
│   │   ├── home.js
│   │   └── orderList.js
│   └── store
│       └── index.js
├── README.md
├── menu.json
```

Now, you can delete menu.json, and start your code!

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