plopjs/plop

Error messages could be improved for built in actions

オープン

#259 opened on 2021/02/25

 (3 件のコメント) (3 件のリアクション) (0 人の担当者)JavaScript (266 件のフォーク)batch import
enhancementgood first issue

Repository metrics

Stars
 (6,845 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド