@xt-pagesource/generate-plop

1.4.1 • Public • Published

All Contributors

Generate Plop

Generate-plop is a simple cli for generating new components really fast and consistently. It can help you to scaffold components, templates, hooks, services and pages (Next.js) simply by running few cli commands. Say goodbye to copy-paste existing components and cleaning them up before you can work on actual task.

Automating the component generation process makes it really easy for the teams to maintain consistency across project and saves a lot of development time.

Generate-plop is by default configured to generate files in TypeScript format. However, you can generate javascript files as well by passing --js flag in script command.

Demo

Features

Generate-plop as of now supports React components generation

  1. React Components: Class and Functional in Atomic Design structure.
  2. React Custom Hooks.
  3. React Context.
  4. React Query Services.
  5. Next.js Pages/Routes.
  6. Checks for name collisions.

Installation

Run following command at the root level of your project.

With Yarn

  yarn add --dev @xt-pagesource/generate-plop

With npm

  npm i @xt-pagesource/generate-plop --save-dev

Configuration

Post installation add a script to generate TypeScript files in your package.json.

  #package.json
  script: {
    ...
    "generate": "generate"
  }

To generate javascript files instead of TypeScript add following script to package.json.

  #package.json
  script: {
    ...
    "generate": "generate --js"
  }

Prerequisite and Dependencies

It works seamlessly with node versions >= ^12.20.0

Its only dependent on two packages:

  1. Plop
  2. minimist

Upcoming Capabilities

  1. Angular Templates
  2. Remix Templates
  3. Raise issues/requests for other capabilities.

Documentation

Documentation

Contributing

Contributions are always welcome!

Generate plop has automated version bump and summary release setup. It is using Changesets to automate the process.

Once you are done with your code updates, you will need to add a changeset. It can be done using the following simple CLI command before committing changes.

With Yarn

  yarn changeset

With npx

  npx changeset

It will create a changeset in the directory .changeset. The changeset created can be update later if required.

Please adhere to this project's code of conduct.

Contributors


Khushboo Kumari

💻

Vinod Loha

💻

Rahul Tagra

💻

Readme

Keywords

none

Package Sidebar

Install

npm i @xt-pagesource/generate-plop

Weekly Downloads

1

Version

1.4.1

License

MIT

Unpacked Size

43.7 kB

Total Files

46

Last publish

Collaborators

  • vinodloha
  • ankurkakroo2
  • amrit_neo
  • chandrakailash1993