Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generator-react-modules

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-react-modules

Yeoman generator for react modules architecture

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

generator-react-modules NPM version Build Status Dependency Status Coverage percentage

Yeoman generator for react modules architecture

Installation

First, install Yeoman and generator-react-modules using npm (we assume you have pre-installed node.js). This generator augments an existing project and should be installed as a dev dependency.

npm install -g yo
cd ~/your/react/project
npm install --save-dev generator-react-modules

Usage

Module Generation
yo react-modules
yo react-modules:module
  • Your selections will be stored. This is useful if you are creating components right after creating the module. You can simply override it when moving on to the next module.
Component Generation
yo react-modules:component
  • Generates both a presentation and container component.
  • It is not required that you first create a module to create a component. The necessary folders will be created.
  • It is idiomatic to capitalize the first letter of your component. Thus, the generator takes care of that for you. If you don't want that, you'll have to rename the file yourself.
  • When creating a component, you'll be prompted about a conflict. This is simply the generator trying to append your new component to the index.js export list. Y should be the default and the option you want to have the append take place. There's no way to suppress this as far as I have found.
Presentation Component Generation
yo react-modules:presentation-component
  • Generates just a presentation component and appends to the index.js list of components.
Container Component Generation
yo react-modules:container-component
  • Generates just a container component and appends to the index.js list of components.
  • Don't include the Container suffix- this will be taken care of for you.
  • A container component assumes a presentation component, but that presentation component doesn't have to exist already (and should be created seperately if desired).

TODO

  • Fix tests- breaking on parse errors.
  • Add CI.
  • Add architecture references and reading to readme.
  • Add sample structure diagram to readme.

License

MIT © Rob Hilgefort

Keywords

FAQs

Package last updated on 23 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc