generator-reactgen

0.3.3 • Public • Published

generator-reactgen

NPM version Build Status Dependency Status Coverage percentageGreenkeeper 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 git@bitbucket.org: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

Package Sidebar

Install

npm i generator-reactgen

Weekly Downloads

8

Version

0.3.3

License

MIT

Last publish

Collaborators

  • aeldar