@xt-pagesource/generate-plop
v1.4.1
Published
Generate new components fast and consistently.
Downloads
18
Keywords
Readme
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.
Features
Generate-plop as of now supports React components generation
- React Components: Class and Functional in Atomic Design structure.
- React Custom Hooks.
- React Context.
- React Query Services.
- Next.js Pages/Routes.
- 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:
Upcoming Capabilities
- Angular Templates
- Remix Templates
- Raise issues/requests for other capabilities.
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
.