Skip to content

patrickstorm/generator-react-up

 
 

Repository files navigation

Overview

This is a simple Yeoman Generator to help speed up the stubbing of a React Component. It supports the usage of Radium for inline styles but default to SCSS. Each component is treated as an individual Module / Package.

Installation

Install Yeoman and this generator using NPM. Assuming NodeJS is installed:

npm install -g yo
npm install -g generator-react-up

Available Methods

Since Yeoman is kind enough to create a generator-generator... I've made this generator even more customizable for you. The goal of react-up was to reduce the boiler plate I had to write and it's worked incredibly well. While at thredUP I've managed to get other developers on board using it as well at which point quickly realized it needed a deeper level of customization.

There are now several smaller generators which rock.

1. Setup / Customization

yo react-up:setup

Simply run the command above and follow the prompts:

  1. Customizable templates
  2. User / Organization Specific Information
2. Default: Dumb Component

yo react-up ComponentName _~ or ~_ yo react-up:pure ComponentName

Create a stateless component / pure function quickly using the command below, simply replace ComponentName for the name of your choice.

3. Smart Component

yo react-up:class ComponentName

Create a smart component that contains all available life-cycle methods and link to the Facebook docs.


Todo:

  • Implement a .yo-rc.json to define the root (this would be more opinionated though) so we can run from the project root and drop into the correct folder.
  • Move generator code to ES6
  • Update Generator tests

License

Apache-2.0 © Matthew D. Shelley

About

Yeoman Generator to speed up your React Development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.8%
  • CSS 0.2%