Closed JoeHart closed 4 years ago
I've fixed this on a local branch by changing the jsAndJsxPattern to:
const jsAndJsxPattern = "{**/*.js,**/*.mjs,**.*.jsx}";
With an added test case too, happy to raise a PR if I can get permission @Macil 😄
You might be running into this issue because you're not quoting the glob expression in the ignore parameter:
yarn flow-copy-source -i '**/*.test.js' src lib
If you don't quote it, then it can be expanded by your shell to "src/index.test.js", and then I think that fails to match because it's compared to just "index.test.js".
I can't reproduce the issue with it quoted like this. (If there is a bug here, then it's probably with the glob dependency, because it's what this package is using for glob handling and file matching.)
Given a file structure of:
And the running of the command:
The
src/index.test.js
file will still be copied.