Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix file watcher excludes issue #48

Merged
merged 1 commit into from
Oct 26, 2016

Conversation

laggingreflex
Copy link
Contributor

@laggingreflex laggingreflex commented Oct 10, 2016

Fix file watcher excludes issue (#47)

Prior to this the File watcher (chokidar) wasn't actually ignoring the excludes. It is required to have cwd option passed in for it to work. (small discussion on the issue here)

Also use anymatch instead of minimatch. It better handles matching both globbed and non-globbed paths.

With these changes we can now simply have exclude patterns like .git, or node_modules (instead of .git/** and .git/**/* or **/.git/**)

Prior to this the File watcher (chokidar) wasn't actually ignoring the excludes. It only excludes either when both the exclude paths and watch path are relative or when both are absolute. We had watch path as an absolute path and ignored paths as relative paths. In this case it is required to have `cwd` option passed in for it to work.

Also use `anymatch` instead of `minimatch`

With these changes we can now have exclude patterns like `.git`, or `node_modules`, instead of `.git/**` and `.git/**/*` or `**/.git/**`.
@joelgriffith
Copy link
Contributor

Sweet, sorry again for the delay in merging these, looks good!

@laggingreflex laggingreflex deleted the excludes branch February 21, 2017 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants