Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Latest commit

 

History

History
63 lines (46 loc) · 2.87 KB

README.md

File metadata and controls

63 lines (46 loc) · 2.87 KB

Github Stars          Github Forks          GitHub watchers       Github Issues

NPM Total Downloads   NPM Monthly Downloads

NPM License           NPM Version

Node Dependencies

React-Up

This is a simple Yeoman Generator to help speed up the stubbing of a React <Component />. Each component is treated as an individual Module / Package with all files being co-located including optional tests.

Installation

Install Yeoman and this generator using NPM. Assuming NodeJS is installed:

# Install yeoman and the generator
npm install -g yo
npm install -g generator-react-up

# Run the initial setup (should be run from the project root)
yo react-up

Default Methods:

Since Yeoman is kind enough to create a generator-generator... I've made this generator even more customizable for you.

The goal of react-up was to reduce the boiler plate required and improve consistency. So far, this generator has saved me a ton of time, enough so that I've decided to upgrade yet again.

This generator is now much more customizable. You can easily create mappings and exist the current templates to fit your particular needs.

# Pure function
yo react-up <ComponentName>

# React Component
yo react-up <ComponentName> class

# Test file
yo react-up <name> test

# Setup (can be run at anytime)
yo react-up:setup

Customization:

To create or modify existing methods available, simply update the mappings.js within your local template folder.

License

Apache-2.0 © Matthew D. Shelley