generator-yarc

1.0.4 • Public • Published

YARC - Yet Another React Component generator for Yeoman

Yet another Yeoman generator for React components

CircleCI


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

Package Sidebar

Install

npm i generator-yarc

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

4.55 kB

Total Files

7

Last publish

Collaborators

  • drj
  • jtruant