plop icon indicating copy to clipboard operation
plop copied to clipboard

Descriptions are missing when using plop.load()

Open piersolenski opened this issue 4 years ago • 4 comments

When using a plopfile.js that loads generators from another file via plop.load, the descriptions appear missing when running plop from the command line. Should they be retained by default or is there a way to specify that they are included via the include object?

piersolenski avatar Nov 19 '20 22:11 piersolenski

So, when you see the list of generators, the imported ones don't have descriptions? That's strange!

amwmedia avatar Nov 27 '20 13:11 amwmedia

So for example, I have a Gatsby Starter template https://github.com/piersolenski/gatsby-starter where I've moved all the Plop functionality into a Plop Pack https://github.com/piersolenski/plop-pack-gatsby-starter.

This is the stack trace for how I'm loading each Plop dependency:

https://github.com/piersolenski/gatsby-starter/blob/main/plopfile.js

https://github.com/piersolenski/plop-pack-gatsby-starter/blob/main/plopfile.js

https://github.com/piersolenski/plop-pack-gatsby-starter/blob/main/src/generators/bootstrap.js#L8

As you can see, the bootstrap generator has the description Bootstrap your project, however when running plop - the descriptions are missing:

Screen Shot 2020-12-02 at 15 16 26

piersolenski avatar Dec 02 '20 15:12 piersolenski

I've noticed the same thing applies for plop.setWelcomeMessage - this must be set in the top level plopfile.js or it's not passed down.

piersolenski avatar Dec 02 '20 15:12 piersolenski

Following this issue as I have just encountered it as well.

bellizio avatar Dec 09 '20 14:12 bellizio