0.1.1 • Published 3 months ago

generator-modern-react v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

modern-react-generator

Description

This Yeoman generator is designed to help you scaffold modern React applications, supporting both JavaScript and TypeScript. The main goal is to provide a clean and helpful structure.

Features

  • Generate components: yo modern-react:component component-name
  • Generate hooks: yo modern-react:hook hook-name
  • Generate context: yo modern-react:context context-name

Installation

To install the Yeoman generator, use the following command:

npm install -g yo
npm install -g generator-modern-react

Docs

Generate components

Generate a component named MyComponent with TypeScript and EmotionJS:

Usage example:

yo modern-react:component MyComponent --ts --emotion

Options:

ParamValuesDefaultEfect
tsBooleanfalseUses typescript
emotionBooleanfalseUses EmotionJS
nostyleBooleanfalseSkip the style creation
notestBooleanfalseSkip the test creation

Generate hooks

Generate a hook named useHook with TypeScript:

Usage example:

yo modern-react:hook useHook --ts

Options:

ParamValuesDefaultEfect
tsBooleanfalseUses typescript

Generate context

Generate a context and provider named AuthContext and AuthProvider with TypeScript:

Usage example:

yo modern-react:context auth --ts

Options:

ParamValuesDefaultEfect
tsBooleanfalseUses typescript