# air-reactjs-component-generator

> A CLI generator for reactjs components, styled-components and store modules. Fork from reactjs-component-generator

Latest version **1.0.0** (published 2018-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install air-reactjs-component-generator
pnpm add air-reactjs-component-generator
yarn add air-reactjs-component-generator
bun add air-reactjs-component-generator
```

Provides the commands `rg`, `rg-init`, `rg-view`, `rg-reset`, `rg-store`, `rg-styled`, `rg-wizard`, `rg-settings`, `rg-component`, `react-generator`, `rg-copy-templates`, `rg-show-templates`, `react-generator-init`, `react-generator-view`, `react-generator-reset`, `react-generator-store`, `react-generator-wizard`, `react-generator-settings`, `react-generator-component`, `react-generator-copy-templates`, `react-generator-show-templates`, `react-generator-component-styled`.

## 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.0 |
| Published | 2018-09-07 |
| First published | 2018-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 16 |
| Unpacked size | 24 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 49 |
| Author | Luca Rasconi |
| Maintainers | elrasco |
| Keywords | redux, react, reactjs, CLI, component generator, javascript, react-native, redux-box |

## Links

- npm: https://www.npmjs.com/package/air-reactjs-component-generator
- Repository: https://github.com/nishantsinghchandel/react-generator
- Homepage: https://github.com/nishantsinghchandle/react-generator#readme
- Issues: https://github.com/nishantsinghchandel/react-generator/issues
- npm.io page: https://npm.io/package/air-reactjs-component-generator

## Dependencies (16)

- [open](https://npm.io/package/open.md) 0.0.5
- [async](https://npm.io/package/async.md) ^2.1.5
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [fs-extra](https://npm.io/package/fs-extra.md) ^2.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^3.0.5
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.0.6
- [metalsmith](https://npm.io/package/metalsmith.md) ^2.3.0
- [consolidate](https://npm.io/package/consolidate.md) ^0.14.5
- [to-slug-case](https://npm.io/package/to-slug-case.md) ^1.0.0
- [to-camel-case](https://npm.io/package/to-camel-case.md) ^1.0.0
- [to-snake-case](https://npm.io/package/to-snake-case.md) ^1.0.0
- [to-space-case](https://npm.io/package/to-space-case.md) ^1.0.0
- [user-settings](https://npm.io/package/user-settings.md) ^0.1.5
- [istextorbinary](https://npm.io/package/istextorbinary.md) ^2.1.0
- [to-pascal-case](https://npm.io/package/to-pascal-case.md) ^1.0.0

## 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.0 (latest) — 2018-09-07

## README

# reactjs-component-generator
A CLI generator for Reactjs components,styled-components and store.

## Install

```console
$ npm install -g reactjs-component-generator
```

## Usage

The most basic command runs a wizard to create a component.

```console
$ rg
```

**Note**: Names can be inputted in any format (slug-case, camelCase, PascalCase etc.).

#### component

Directly create a component based on the current settings.

```console
$ rg component <name>
```

Arguments:

* ```name```: The name you want to use for the component.

Options:

* ```-d, --destination <destination>```: Override the destination for component.
* ```-p, --template-path <template-path>```: Override template path.
* ```-t, --template <template>```: Override template type. By default it uses the 'component' folder from the template path. With this option you can use a different template folder.
* ```-f, --force```: Force creation of a component. By default it's impossible to create a component if the destination path doesn't exist. This option forces the creation of a component and will generates the destination folders if they don't exist.

Examples:
```console
$ rg component check-box
$ rg component RadioButton -d ./components/ui
$ rg component videoPlayer -d ./src/components/players/ -t base-video-component -f
```

The generated file will be
`*filename.css
*index.js
*filename.js`

#### styled component

Directly create a component based on the current settings with styled component.

```console
$ rg-styled <name>
```

Arguments:

* ```name```: The name you want to use for the component.

Options:

* ```-d, --destination <destination>```: Override the destination for component.
* ```-p, --template-path <template-path>```: Override template path.
* ```-t, --template <template>```: Override template type. By default it uses the 'component' folder from the template path. With this option you can use a different template folder.
* ```-f, --force```: Force creation of a component. By default it's impossible to create a component if the destination path doesn't exist. This option forces the creation of a component and will generates the destination folders if they don't exist.

Examples:
```console
$ rg-styled check-box
$ rg-styled RadioButton -d ./my-component/ui
$ rg-styled videoPlayer -d ./src/my-component/players/ -t base-video-component -f
```

The generated file will be
`*filename.styled.js
*index.js
*filename.js`

#### store
Directly create a store module based on the current settings.

```console
$ rg store <name>
```

Arguments:

name: The name you want to use for the store module.
Options:

* ```-d, --destination <destination>```: Override the destination for store module.
* ```-p, --template-path <template-path>```: Override template path.
* ```-t, --template <template>```: Override template type. By default it uses the 'store' folder from the template path. With this option you can use a different template folder.
* ```-f, --force```: Force creation of a store. By default it's impossible to create a component if the destination path doesn't exist. This option forces the creation of a component and will generates the destination folders if they don't exist.

Examples:
```
$ rg store user
$ rg store shopping-cart -d ./modules
$ rg store Car -t complex-store
```

**Note**:This store is specifically for Redux-box users.
Take a look at redux-box : ```https://www.npmjs.com/search?q=redux-box```

The generated file will be
`
*action.js
*index.js
*mutations.js
*sagas.js
*state.js
`

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