1.0.2 • Published 2 years ago
plop-gen v1.0.2
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-genInstall plop-gen globally
$ npm install -g plop-genCLI 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 nameOptions:
$ 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 againstExamples:
$ pgen
$ pgen create-component --cwd /path/where/you/will/create/your/component
$ pgen rename-componentCreate a component
- You need just to run
pgenfrom the terminal
$ pgenThen, choose the
create-componentgenerator
Or you can run directly this command:
$ pgen create-componentThen, choose the framework you like to use from the list:
- react
- angular
- vue
- stencil
Enter the name of your component
- 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
$ pgenThen, choose the rename-component generator
Or you can run directly this command:
$ pgen rename-componentThen follow the steps.
License
Licensed under MIT.