node package manager



Continuous Integration Coverage Status Downloads Version License

react component project generator


First, install Yeoman and generator-mitchallen-react-component using npm (we assume you have pre-installed node.js).

Note: You may need to preface npm install -g commands with sudo.

npm install -g yo
npm install -g generator-mitchallen-react-component

Create and Generate Project

Then generate your new project:

mkdir myproject
cd myproject
yo mitchallen-react-component

Skip Tests

To skip running tests after package creation, use the --notest flag:

yo mitchallen-react-component --notest

How-To Article

For more detailed instructions, see this article:

Continuous Integration Support

There seems to be issues running webpack under TravisCI. So I've made the following changes:

  • Added support for CircleCI
    • Generated projects will now create the following hidden folder and file:
      • .circleci/config.yml
      • You can see it on a Mac/Linux with: ls -la
  • The badge and link generated in the README now point to your project on CircleCI
  • You are now prompted for your CirclCI username instead of your Travis CI username
  • A .travis.yml file will still be generated, but currently leads to a failed build under Linux (Ubuntu Precise and Ubuntu Trusty)
  • You can track my bug report here:
  • When resolved I'll restore support for Travis CI

Getting To Know Yeoman


Install Test Framework

To run the generator tests you will need to globally install jest (

npm install -g jest jest-cli

To test, go to the root folder and type:

npm test


MIT © Mitch Allen

Version History

Version 0.0.37

  • Added react-test-renderer ^15.6.1 to generated package.json to remove test warnings.

Version 0.0.36

  • Updated dependency versions in generated package.json

Version 0.0.35

  • Added CircleCI support
  • Replaced TravisCI badge link in generated README with CircleCI link
  • Added link to How-To article in this doc.

Version 0.0.34

  • Upgraded local npm to 5.0.3 to resolve readme not being included in published package

Version 0.0.33

  • Corrected documentation on what test framework needs to be installed where
  • Removed link script

Version 0.0.32

  • removed extra code coverage step from .travis.xml

Version 0.0.31

  • Install codecov dev dependency for test coverage
  • Adjusted test-coverage script

Version 0.0.30

  • Add test-coverage script

Version 0.0.29

  • Added codecoverage support to .travis.yml
  • Added a .npmignore file

Version 0.0.28

  • Updated _travis.yml template to install jest

Version 0.0.27

  • Updated .travis.yml to install jest before running generator tests

Version 0.0.26

  • Cleaned up console logging

Version 0.0.25

  • Added note about installing jest globally

Version 0.0.24

  • Updated badges in readme

Version 0.0.23

  • Generator test case now passes --notest option

Version 0.0.22

  • Added --notest flag which will skip test run after package creation

Version 0.0.21

  • Added end routine to run npm test at the end
  • This triggers webpack
  • This causes a side effect causing the generator tests themselves to throw an error (update: use --notest flag to skip)

Version 0.0.20

  • Removed work in progress message from readme