1.2.0 • Published 9 years ago
generator-not-bad-react-component v1.2.0
Not Bad Generator For React Component Scaffolding
Made with 💟 to DX
- PureComponent by default
- An option to use stateless component
- An option to omit props even
- An option to choose files extensions
- Ability to add Jest spec file
- ES6 syntax for the component
How To Use
Install Yeoman locally for better DX.
npm i -g yoAdd Not Bad generator to dev dependencies for your React-based project:
npm i --save-dev generator-not-bad-react-componentThen add special script inside package.json, similar to
...
"scripts": {
"scaffold:component": "yo not-bad-react-component"
}
...So everybody in your team can just type npm run scaffold:component in order to create a folder for the new React component.
What To Expect
The structure of the component folder is a little bit excessive:
/components
|-- UiComponent
| |-- __tests__
| | `-- UiComponent.spec.jsx
| |-- UiComponent.css
| |-- UiComponent.jsx
| `-- index.jsRoadmap
- redux support
- ✅ Jest support