plopjs/plop

Error messages could be improved for built in actions

Open

#259 aperta il 25 feb 2021

Vedi su GitHub
 (3 commenti) (3 reazioni) (0 assegnatari)JavaScript (266 fork)batch import
enhancementgood first issue

Metriche repository

Star
 (6845 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor