1.0.2 • Published 6 months ago

plop-gen v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Plop-gen

A tool based on plop.js that gives you a simple way to generate your react, angular, vue and stencil components. You can create also structures and patterns in our code (routes, controllers, components, helpers, etc).

Installation

Add plop-gen to your project
$ npm install --save-dev plop-gen
Install plop-gen globally
$ npm install -g plop-gen

CLI Usage

Once plop-gen is installed, you are ready to run pgen from the terminal.

Usage:
$ pgen          // Select from a list of available generators
$ pgen <name>   // Run a generator registered under that name
Options:
$ pgen -h, --help        // Show the help
$ pgen -i, --init        // Create a basic plopfile.js
$ pgen -p, --plopfile    // Path to the plopfile
$ pgen -v, --version     // Display current version
$ pgen --cwd             // Directory from which relative paths are calculated against
Examples:
$ pgen
$ pgen create-component --cwd /path/where/you/will/create/your/component
$ pgen rename-component

Create a component

  1. You need just to run pgen from the terminal
$ pgen
  1. Then, choose the create-component generator

Or you can run directly this command:

$ pgen create-component
  1. Then, choose the framework you like to use from the list:

    • react
    • angular
    • vue
    • stencil
  2. Enter the name of your component

  3. Select the where you want to create the component. Enjoy :) your component was created

Rename component

If you need to rename a component:

You need just to run pgen from the terminal

$ pgen

Then, choose the rename-component generator

Or you can run directly this command:

$ pgen rename-component

Then follow the steps.

License

Licensed under MIT.