johnagan / clean-webpack-plugin

A webpack plugin to remove your build folder(s) before building

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose glob options to distinguish files and directories

Bilge opened this issue · comments

commented

Feature Proposal

To facilitate filtering files vs directories, exposing glob options is essential. The underlying glob library has an option called onlyFiles but this is not available via this plug-in. It is not possible to distinguish files and directories using glob patterns alone.

Feature Use Case

glob('*') should be able to match only files, without manually excluding every directory by name. Sometimes it is possible to distinguish files from directories if we can assume files always contain a dot (.) and directories never do (glob('*.*')), but this is not always the case and never guaranteed.