Yeoman generator for React/Redux apps
First, install Yeoman and generator-reactgen
using yarn or npm
(it is assumed that node.js has already been pre-installed).
yarn global add yo # npm i -g yo
yarn global add generator-reactgen # npm i -g generator-reactgen
just mark the root of the project:
yo reactgen
yo reactgen:init
To create a new component:
yo reactgen:component new_component_name
Component name must be specified as an argument. If it is a simple name, then the component will be created inside src/modules/common/. If it has slashes, then the component will be created inside src/modules/<specified_directory_tree>.
Examples:
Create src/modules/common/MyComponent.jsx:
yo reactgen:component MyComponent
Create src/modules/pageOne/MyComponent/MyComponent.jsx:
yo reactgen:component pageOne/MyComponent/MyComponent
yo reactgen:module new_module_name
Clone this repo, and link it globaly:
git clone git@bitbucket.org:aeldar/generator-reactgen.git
cd generator-reactgen
yarn link # npm link
- Update React/Redux init template.
- Make init and save .yo-rc a single step.
MIT © Eldar Aliyev