# react-cg

> react component generator

Latest version **1.0.7** (published 2019-05-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-cg
pnpm add react-cg
yarn add react-cg
bun add react-cg
```

Provides the command `react-cg`.

## 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.7 |
| Published | 2019-05-30 |
| First published | 2019-05-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | anilpdv |
| Maintainers | anilpdv42 |
| Keywords | react, component-generator, react-cg |

## Links

- npm: https://www.npmjs.com/package/react-cg
- Repository: https://github.com/anilpdv/react-component-generator
- Homepage: https://github.com/anilpdv/react-component-generator#readme
- Issues: https://github.com/anilpdv/react-component-generator/issues
- npm.io page: https://npm.io/package/react-cg

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [inquirer](https://npm.io/package/inquirer.md) ^6.3.1
- [commander](https://npm.io/package/commander.md) ^2.20.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.7 (latest) — 2019-05-30
- 1.0.6 — 2019-05-27
- 1.0.5 — 2019-05-22
- 1.0.4 — 2019-05-22
- 1.0.3 — 2019-05-22
- 1.0.2 — 2019-05-20
- 1.0.1 — 2019-05-20
- 1.0.0 — 2019-05-20

## README

# React-cg


[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)

React-cg is simple component generator for react with some boiler code.

```sh
$ react-cg -h
Usage: react-cg [options] [command]

rgc

Options:
  -V, --version      output the version number
  -h, --help         output usage information

Commands:
  generate|g <name>  generate component

```

# Commads
> react-cg has only one command generate alias 'g' to generate component.
> it will ask for which component type you want like class or hook, use space to select.

```sh
$ react-cg generate PostsList
? select component type (Press <space> to select, <a> t
o toggle all, <i> to invert selection)
❯◯ class
 ◯ hook
```
> it will ask for which javascript extension type you want like js or jsx, use space to select.

```sh
? select component type class
? select js type (Press <space> to select, <a> to toggle all, <i> to i
nvert selection)
❯◯ js
 ◯ jsx

```
> after selecting for javascript extension you will see another prompt for style sheet extension.
```sh
? select component type class
? select js type jsx
? Select css type (Press <space> to select, <a> to toggle all, <i> to 
invert selection)
❯◯ css
 ◯ scss
 ◯ sass
```
>after selecting style sheet you can see your component folder in current directory.
```sh
? select component type class
? select js type jsx
? Select css type css
file : PostList.component.jsx genrated in PostList folder
file : PostList.component.css generated in PostList folder
```

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