-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-source-filesystem): Added an 'ignore' property to the options to ignore more files. #8016
feat(gatsby-source-filesystem): Added an 'ignore' property to the options to ignore more files. #8016
Conversation
…ions to ignore more files.
You are the man! #8017 |
please add doc for the new option |
@nihgwu Heh, that's a funny coincidence. I wrote a small note in the README.md of gatsby-source-filesystem. Happy to write more docs if I can be pointed to where they should go. |
add an extra |
…E and fixed an error in the example.
Very nitpicky - could you update list of default ignored stuff ( it was changed very recently in #8017 ) ---edit |
Travis has some problems with reporting status but tests passed - https://travis-ci.org/gatsbyjs/gatsby/builds/426692369 so I'm going to merge that in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Mike-Dax!
@pieh Do you think that all dot files should be ignored by default? If so I'll create a second PR. |
Any reason to ignore all dot files? |
@KyleAMathews I would think it would be unlikely that someone intended for dot files to produce content. Unfortunately chokidar doesn't seem to have any method for whitelisting files explicitly if that is the intention and 'no dot files' is the default. Some editors unfortunately pollute the file system with autosave files with a dot prefix, if they're pages with page queries that can cause this error:
|
…ions to ignore more files. (gatsbyjs#8016) * feat(gatsby-source-filesystem): Added an 'ignore' property to the options to ignore more files. * docs(gatsby-source-filesystem): Added an options section to the README and fixed an error in the example. * update default list
One of my clients uses a markdown editor that saves
.~<filename>
temporary files in an auto-save context. These get eaten up by the gatsby-source-filesystem plugin and can cause issues.This PR allows for an
ignore
array in the options to specify more regex's to ignore.I would argue that adding
**/\.*
to the default list of ignores (ignore dot files) would be a sane default, but that might be considered a breaking change?I can amend this PR with that change / make a second PR if desired.