๐Ÿ’ง plop generator react component

June 21, 2021 ยท View on GitHub

version downloads size github actions coverage typescript contributing contributors discord

A plop generator for react components.

๐Ÿ“ฆ Installation

This package is hosted on npm.

npm install --save-dev @bradgarropy/plop-generator-react-component

๐Ÿฅ‘ Usage

First, be sure you have plop installed. Then, add the following line to your plopfile.js.

plop.load("@bradgarropy/plop-generator-react-component")

Now you'll have access to the component generator as shown below.

plop component

The component generator scaffolds a component, including tests and an associated css module. The resulting directory looks like this for a component named Component.

src
โ””โ”€โ”€ components
   โ””โ”€โ”€ Component
      โ”œโ”€โ”€ index.ts
      โ”œโ”€โ”€ Component.tsx
      โ”œโ”€โ”€ Component.test.tsx
      โ””โ”€โ”€ Component.module.css

โ” Questions

๐Ÿ› report bugs by filing issues
๐Ÿ“ข provide feedback with issues or on twitter
๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ use my ama or twitter to ask any other questions

โœจ contributors


Brad Garropy

๐Ÿ’ป ๐Ÿ“– โš ๏ธ ๐Ÿš‡