generator-yarc
v1.0.4
Published
Yet another Yeoman generator for React components
Downloads
2
Readme
YARC - Yet Another React Component generator for Yeoman
Yet another Yeoman generator for React components
install
$ npm install -g generator-yarc
requirements
enzyme
$ npm install --save-dev enzyme enzyme-adapter-react-16 react-test-renderer
jest
If you did not create your React project w/ create-react-app then follow the jest
installation instructions here.
usage
$ yo yarc [NAME]
creates Component.js
and Component.test.js
See app/templates
for the (ejs) templates used.
options
--class
makes a class component instead of a pure function.
why another react component generator?
This generator:
- Only tries to generate the component / test files
- Leaves React scaffolding to projects that do it well. I.E. create-react-app
- The test asserts that the generated component is rendering out of the box
running tests
$ npm test
License
MIT