plopr

1.0.3 • Public • Published

plopR - A React Plop Generator

A React plop generator to quickly and simply create React components with the latest React features, such as Hooks, Lazy and more.

Quickly generate both Components & Containers with actions, reducers, Intl and test scaffolding.

Installation

// install using npm
npm --D plopr
// using yarn
yarn add plopr --dev

Getting Started

"Scripts": {
    // key can be any name or value you wish
    "plopr": "plopr"
}

Now, just call it with with whatever package manager you want. yarn plopr. Thats it!.

Available Prompts

Plopr offers the following Prompts (for now anyway):

Component

// Component type
 - [Stateless, Pure Stateless, Component]
// Component Name
 - [Name]
// Translations
 - [Intl]
// Load component asynchronously
 - [Anync Loadable]

Container

// Component type
 - [Stateless, Pure Stateless, Component]
// Component Name
 - [Name]
// Headers using react-helmet
 - [Headers]
// Actions and Reducers using React Hooks
 - [Actions and Reducers]
// Translations
 - [Intl]
// Load component asynchronously
 - [Anync Loadable]

Options

Plopr allows you to set two options:

// set the app src folder - (default is src)
plopr --appSrc={your application src folder}
// Allows you to dynamically select your output location
// rather than using the defaults below:
// - containers = {appSrc}/containers
// - components = {appSrc}/components
plopr --freestyle˚

Contribution

Please feel free to contribute. This generator was made to provide a basic starting point, however it is easily extensible.


made with 💜 @theboyWhoCriedWoolf.

Package Sidebar

Install

npm i plopr

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

26.1 kB

Total Files

27

Last publish

Collaborators

  • theboywhocriedwoolf