An open API service indexing awesome lists of open source software.

https://github.com/anilpdv/react-component-generator

generates react components with angular name convection.
https://github.com/anilpdv/react-component-generator

react react-cg react-component-generator

Last synced: about 2 months ago
JSON representation

generates react components with angular name convection.

Awesome Lists containing this project

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 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 to select, t
o toggle all, 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 to select,
to toggle all, 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 to select,
to toggle all, 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
```