add-react-component
Generate the component boilerplate, CSS, and a shallow render test with one line.
Install
Run
npm install -g add-react-component
Usage
# Generate PureComponent and shallow render test
$ add-react-component
# Generate PureComponent and shallow render test with stylesheet
$ add-react-component -c
# Generate Functional Component and shallow render test with stylesheet
$ add-react-component -c -f
Example
add-react-component example -c
Generates example
folder with the following:
index.js
style.css
example.js
{ return <div className=stylecontainer>test</div> }
example.test.js
License
MIT © Jack Hanford