You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-create-helper

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-create-helper

create components, reducers and actions easier

0.1.5
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

react-create-helper

Install

npm i -g react-create-helper

Options

You can provide options in your package json like that

"react-create-helper": {
    "base": "./src",
    "actionsDir": "actions",
    "reducersDir": "reducers",
    "componentName": {
      "prepend": "My",
      "append": "Component"
    },
    "styleExtension": "css"
  }

base: base dir for components from your project root

actionsDir: base dir of actions from base

reducersDir: base dir of reducers from base

componentName: also you can configure prefix and suffix of component name.

styleExtension: style extension)))

######Does not overwrite files

Generate component

rch Header

output

Header
├── Header.js
├── Header.scss
└── index.js

Generate action & reducers

package.json

"react-create-helper": {
    "base": "./src",
    "actionsDir": "Actions",
    "reducersDir": "Reducers",
    "componentName": {
      "prepend": "My",
      "append": "Component"
    },
    "styleExtension": "css"
  }
$ rch -c Example
$ rch -a ExampleAction
$ rch -r ExampleReducer

This will generate something like this

src
  ├── MyHeaderComponent
  │   ├── MyExampleComponent.js
  │   ├── MyExampleComponent.css
  │   └── index.js
  ├── Actions
  │   └── ExampleAction.js
  └── Reducers
      └── ExampleReducer.js

Also you can use rch -h. To see all options and usage examples;

Keywords

react

FAQs

Package last updated on 02 Mar 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