plop
plop copied to clipboard
Descriptions are missing when using plop.load()
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?
So, when you see the list of generators, the imported ones don't have descriptions? That's strange!
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:
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.
Following this issue as I have just encountered it as well.