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.
- Host: GitHub
- URL: https://github.com/anilpdv/react-component-generator
- Owner: anilpdv
- Created: 2019-05-20T16:13:04.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T21:06:06.000Z (about 5 years ago)
- Last Synced: 2024-04-28T07:09:28.820Z (about 2 years ago)
- Topics: react, react-cg, react-component-generator
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/react-cg
- Size: 2.46 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React-cg
[](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
```