How to use plop - 1 common examples

To help you get started, we’ve selected a few plop examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ch-apptitude / goomi / index.js View on Github external
const runGenerator = (args, options) => {
  const generators = goomiGenerators.getGeneratorList();
  if (!args.generatorName) {
    plopOout.chooseOptionFromList(generators).then(function (generatorName) {
      doThePlop(goomiGenerators.getGenerator(generatorName));
    });
  } else if (
    generators
      .map(function (v) {
        return v.name;
      })
      .indexOf(args.generatorName) > -1
  ) {
    doThePlop(goomiGenerators.getGenerator(args.generatorName));
  } else {
    console.error(chalk.red('[PLOP] ') + 'Generator "' + generator + '" not found in plopfile');
    process.exit(1);
  }
};

plop

Micro-generator framework that makes it easy for an entire team to create files with a level of uniformity

MIT
Latest version published 1 year ago

Package Health Score

74 / 100
Full package analysis