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 chokidar options object in generateAndWatch #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leoj3n
Copy link
Contributor

@leoj3n leoj3n commented Apr 5, 2017

@chasenlehara
Copy link
Contributor

Since this isn’t associated with an issue, could you please explain what was broken and how this fixes it?

@leoj3n
Copy link
Contributor Author

leoj3n commented Apr 16, 2017

@chasenlehara When reading through the code noticed this ignore pattern looked wrong

pattern.push("!"+siteConfig.glob.ignore)

I gave the --watch flag a try, and sure enough it did not respect the ignore rules.

That code "!"+siteConfig.glob.ignore results in something like:

image

Which is not a valid glob ignore pattern.

There is chokidar->anymatch->micromatch->extglob which means you could add to pattern something like:

"!(a|b|c)"

But chokidar provides the ignored option for this purpose, so we can just pass in the array directly (like I have done in the PR) without needing to build that negation string.

@leoj3n leoj3n self-assigned this Apr 17, 2017
@leoj3n leoj3n added the bug label Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants