Giter Site home page Giter Site logo

khus29 / component-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pagesource/component-generator

0.0 0.0 0.0 697 KB

Generate-plop is a simple cli for generating new components really fast and consistently.

License: MIT License

JavaScript 37.18% Handlebars 62.82%

component-generator's Introduction

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

Contributors

  1. Khushboo Kumari
  2. Vinod Loha

component-generator's People

Contributors

vinodloha avatar khus29 avatar rahultagra avatar github-actions[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.