Skip to content

aeldar/generator-reactgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5942204 · Dec 30, 2017

History

42 Commits
Nov 10, 2017
Nov 10, 2017
Nov 10, 2017
Nov 10, 2017
Nov 10, 2017
Nov 10, 2017
Nov 10, 2017
Nov 11, 2017
Nov 10, 2017
Nov 11, 2017
Dec 30, 2017
Dec 30, 2017

Repository files navigation

generator-reactgen

NPM version Build Status Dependency Status Coverage percentage Greenkeeper badge

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