1.1.0 • Published 3 years ago
generate-cli-react v1.1.0
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-dev
Usage
This command create a folder with your component within default directory.
npx generate-react component Box
You can also generate a few components at once.
npx generate-react component Box Card Button
Example of the component files structure by default:
|-- /src
|-- /components
|-- /Box
|-- Box.js
|-- index.js
Options
You can also overwrite default options.
npx generate-react component Box --withStyle --usePreprocessor scss
Example of the component files structure with options above:
|-- /src
|-- /components
|-- /Box
|-- Box.js
|-- Box.scss
|-- index.js