plopjs / plop

Consistency Made Simple
http://plopjs.com
MIT License
7.13k stars 277 forks source link

Modify without pattern raises error #258

Closed dy closed 2 years ago

dy commented 3 years ago

Docs say that in case of modify action pattern defaults to end-of-file. Same time, running it as

,...
    {
      type: "modify",
      path: "masters/wavefont.designspace",
      // pattern: '',
      template: 'APPENDED'
    },
    ...

creates error:

Invalid modify action (modify must have a pattern or transform function)
crutchcorn commented 2 years ago

The error itself mentions what's happening here - your modify action either needs a pattern (which has been commented out in your example) or a transform function to modify the values