generator-r-gen
v0.1.1
Published
Generate React goodies
Downloads
5
Maintainers
Readme
r-gen
Generate React goodies with ease
Installation
First, install Yeoman and generator-r-gen using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-r-gen
yo r-gen
Then start generating React goodies!
Components
Currently, r-gen will generate React components with a MobX flavour. To create a component:
yo r-gen:component
Command line options
To speed things up, you can pass options when first calling the generator. Example:
yo r-gen:component --scss
The above will create the .scss file without prompting, but will prompt you for other options.
Available options
--folder
- Sets the creation of a folder totrue
--scss
- Sets the creation of an associated scss file totrue
--cssModules
- Sets the creation of a @CSSModules decorator totrue
--propTypes
- Sets the generation of propTypes and defaultProps totrue
--observer
- Sets the creation of an @observer decorator totrue
--all
- Sets all of the above totrue
Stores
Currently, r-gen will generate stores with very MobX-y flavour. To create a store:
yo r-gen:store
License
MIT © James Sear