plopjs / plop

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

Ensure addMany actions strip extensions correctly on dot files #366

Closed alarner closed 1 year ago

alarner commented 1 year ago

Fixes #324

Nodes path.parse does not treat dot files as an extension. For example path.parse('.gitignore') results in the following:

{ root: '', dir: '', base: '.gitignore', ext: '', name: '.gitignore' }

Because ext is an empty string rather than '.gitignore', extensions were not being stripped properly from dot files due to the path.parse(maybeFile.name).ext !== "" clause.

alarner commented 1 year ago

Is there anything I process need to follow to get this reviewed?