Skip to content

IGNW/ignw-component-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ignw-component-generator

React Component Generator - Micro-generator framework that makes it easy for an entire team to create react component files with a level of uniformity.

Prerequisites

  • NodeJS

Getting Started

Add ignw-component-generator to your project

npm install --save-dev ignw-component-generator

Usage

// package.json
{
  "scripts": {
      "plop:component": "plop --plopfile ./node_modules/ignw-component-generator/plopfile.ts"
  },
  ...
}

CLI Example: npm run plop:component app bar

This command will:

  1. Create a new src/components/app-bar/index.ts file.
  2. Create a new src/components/app-bar/AppBar.tsx file.
  3. Create a new src/components/app-bar/AppBar.stories.tsx file.
  4. Create a new src/components/app-bar/AppBar.test.tsx file.

Full Example

> npm run plop:component
> plop --plopfile ./node_modules/ignw-component-generator/plopfile.ts

? react component name app bar
✔ ++ /src/components/app-bar/index.ts
✔ ++ /src/components/app-bar/AppBar.tsx
✔ ++ /src/components/app-bar/AppBar.stories.tsx
✔ ++ /src/components/app-bar/AppBar.test.tsx

About

React Component Generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published