plopjs/plop

Error messages could be improved for built in actions

Open

#259 opened on Feb 25, 2021

View on GitHub
 (3 comments) (3 reactions) (0 assignees)JavaScript (6,845 stars) (266 forks)batch import
enhancementgood first issue

Description

I was stuck for a while trying to get addMany to work, my issues turned out to be a minor typo in a property name. templateFile should have been templateFiles.

action:

{
  type: 'addMany',
  destination: 'generated/{{name}}',
  base: 'templates',
  templateFile: 'templates/base/**/*'
}

error message:

✖  +! You must pass a string or Handlebars AST to Handlebars.compile. You passed undefined

It would have saved me a headache if the error had informed me that I didn't have the required property templateFiles

Contributor guide