generate-react-components

Allows you to easily generate new react components. Features: - Typescript and Javascript support - SCSS, SASS, and CSS support - Multiple component generation

Usage no npm install needed!

<script type="module">
  import generateReactComponents from 'https://cdn.skypack.dev/generate-react-components';
</script>

README

generate-react-components

generate-react-components allows you to easily generate (multiple) react components.

Contents

Introduction

Inspired by stencil's component generator, generate-react-components is a CLI application for generating (multiple) react components. It is designed to be easy to use while providing a great set of features, including:

  • Typescript and Javascript support
  • SCSS, SASS, and CSS support
  • Multiple component generation
  • File selection/deselection

Getting started

Installation

Install generate-react-components globally

npm i -g generate-react-components

or locally

npm i generate-react-components

Usage

  1. Execute generate-react-components or if installed locally npx generate-react-components

  2. Insert component names

    Alt names

  3. Select language

    Alt language

  4. Select stylesheet language

    Alt stylesheet

  5. Select files to generate

    Alt selection

You can also provide the name of the components as an argument:

generate-react-components Slider Button Menu Switch

Arguments

Short flag Long flag Description
-f --functional Enable functional templates
-p --path <path/to/dir> Specify components directory
-t --no-template Disable templates