plopjs/plop

Error messages could be improved for built in actions

Open

#259 创建于 2021年2月25日

在 GitHub 查看
 (3 评论) (3 反应) (0 负责人)JavaScript (6,845 star) (266 fork)batch import
enhancementgood first issue

描述

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

贡献者指南

Error messages could be improved for built in actions · plopjs/plop#259 | Good First Issue