Skip to content
This repository was archived by the owner on Apr 27, 2020. It is now read-only.

Latest commit

 

History

History
43 lines (28 loc) · 1.08 KB

File metadata and controls

43 lines (28 loc) · 1.08 KB

React Generate Component

Build Status codecov

This is a tool to generate React Component files.

Installation

$ npm install -g @lezhin/react-generate-component

Usage

CLI

Usage: rgc [options] <name ...>


Options:

-V, --version        output the version number
-c, --config <path>  set a custom path to look for a config file
-o, --override       set a allow files to override
-h, --help           output usage information

Node.js

const rgc = require('@lezhin/react-generate-component').generate;

const componentNames = ['hello', 'world'];
const customConfig = {};
const allowOverride = false;

rgc(componentNames, customConfig, allowOverride).then(() => {
    console.log('Generated!');
});