Documentation
Creating good boilerplate shouldn't require a masters degree. Read over the one page getting started guide and you'll be well on your way.
Once plop is setup, anyone on the team can simply type plop into the terminal. The right way to create your code, is now the easiest way.
Allow your boilerplate to grow and change with the codebase it is generating. Adding new generators can be as simple as writing a template.
Keep everyone up to date as they build. When your generators live in your codebase, everyone gets the latest version by simply pulling from the repo.
Plop uses the popular handlebars template engine to generate your files. Many developers are already familiar with the handlebars syntax.
Plop can generate any type of code! Use plop to generate HTML, CSS, JavaScript, CSharp, Objective C, Selenium tests, microservices... anything!
I ❤︎ plop by @amwmedia. It's so great.https://t.co/sdMpnq64bt pic.twitter.com/8YECdFt08H
— Max Stoiber @ 🇦🇹 (@mxstbr) April 7, 2016
How'd I miss this? Quite slick: Easily generate files via the command line using your own custom templates using Plop.
— Cory House 🏠 (@housecor) April 4, 2018
An elegant way to help enforce consistency and eliminate time typing boilerplate. https://t.co/Vkv4pgsSat
I have discovered #plop (micro-generator framework) just yesterday and I am already in love. Check it out! https://t.co/6UbxTxgP3C
— Manuel Bieh (@ManuelBieh) January 21, 2016
module.exports = function (plop) {
plop.setGenerator('controller', {
description: 'application controller',
// inquirer prompts
prompts: [{
type: 'input',
name: 'name',
message: 'Controller name?'
}],
// actions to perform
actions: [{
type: 'add',
path: 'src/controllers/{{dashCase name}}.js',
templateFile: 'templates/controller.hbs',
}]
});
};