generate-cli-react
v1.1.0
Published
A simple React CLI for generating components.
Downloads
98
Maintainers
Readme
Generate React CLI
This tool provides fast creating React components and gets rid of copying, pasting and renaming files.
Installation
npm install generate-cli-react --save-devUsage
This command create a folder with your component within default directory.
npx generate-react component BoxYou can also generate a few components at once.
npx generate-react component Box Card ButtonExample of the component files structure by default:
|-- /src
|-- /components
|-- /Box
|-- Box.js
|-- index.jsOptions
You can also overwrite default options.
npx generate-react component Box --withStyle --usePreprocessor scssExample of the component files structure with options above:
|-- /src
|-- /components
|-- /Box
|-- Box.js
|-- Box.scss
|-- index.js