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.
Install Yeoman and this generator using NPM. Assuming NodeJS is installed:
npm install -g yo
npm install -g generator-react-up
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.
yo react-up:setup
Simply run the command above and follow the prompts:
- Customizable templates
- User / Organization Specific Information
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.
yo react-up:class ComponentName
Create a smart component that contains all available life-cycle methods and link to the Facebook docs.
- 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
Apache-2.0 © Matthew D. Shelley