copyfiles
copyfiles copied to clipboard
Negate exclude glob
Currently, the negation pattern for globs is dysfunctional. This is necessary for cases such as file inclusion differences between production and development modes.
Example negation pattern use:
args.indexOf('production') >= 0 ? '!*.min.js' : '*.min.js'
so we do have the exclude option, does that not work ?
@calvinmetcalf the exclude works well with the idea of "exclude anything that contains the substring '.min'" but doesn't seem to work with "exclude anything that doesn't have the substring '.min'"
I have tried '!*.min' with no success and '!(*.min)' throws an error.
we use https://github.com/isaacs/node-glob behind the scenes and the options are passed to them verbatim so it may be an issue in that library possibly related to https://github.com/isaacs/node-glob/issues/231 ?
On Fri, Sep 14, 2018 at 4:42 PM Antoinette Janus [email protected] wrote:
@calvinmetcalf https://github.com/calvinmetcalf the exclude works well with the idea of "exclude anything including the substring '.min'" but doesn't seem to work with "exclude anything that doesn't have the substring '.min'"
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/calvinmetcalf/copyfiles/issues/47#issuecomment-421478740, or mute the thread https://github.com/notifications/unsubscribe-auth/ABE4nzKLmBJwuDL8ZCbxz7IaH5UUnLjhks5ubBSfgaJpZM4Wp2DR .
@calvinmetcalf I figured out the fix for this. I'm going to fork your repo, add a test, update the README with an example, and open a PR