plopjs/plop

Error messages could be improved for built in actions

Open

#259 aberto em 25 de fev. de 2021

Ver no GitHub
 (3 comments) (3 reactions) (0 assignees)JavaScript (266 forks)batch import
enhancementgood first issue

Métricas do repositório

Stars
 (6.845 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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

Guia do colaborador