generator-reactgen
v0.3.3
Published
Yeoman generator for React/Redux apps
Downloads
10
Readme
generator-reactgen
Yeoman generator for React/Redux apps
Installation
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
Usage
Initialization
just mark the root of the project:
yo reactgen
Create initial structure
yo reactgen:init
New component
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
New module
yo reactgen:module new_module_name
Intallation for development
Clone this repo, and link it globaly:
git clone [email protected]:aeldar/generator-reactgen.git
cd generator-reactgen
yarn link # npm link
TODO
- Update React/Redux init template.
- Make init and save .yo-rc a single step.
License
MIT © Eldar Aliyev