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/**)
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 ofminimatch
. It better handles matching both globbed and non-globbed paths.With these changes we can now simply have exclude patterns like
.git
, ornode_modules
(instead of.git/**
and.git/**/*
or**/.git/**
)