plopjs/plop

Error messages could be improved for built in actions

Open

#259 geöffnet am 25. Feb. 2021

Auf GitHub ansehen
 (3 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)JavaScript (6.845 Stars) (266 Forks)batch import
enhancementgood first issue

Beschreibung

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