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

Clarify addWatchTarget will not add files/folders in .gitignore #464

Closed
therealpecus opened this issue Mar 31, 2020 · 1 comment
Closed

Comments

@therealpecus
Copy link
Contributor

therealpecus commented Mar 31, 2020

This surfaced in 11ty/eleventy#893

Eleventy normally ignores files in .gitignore, and this also applies to addWatchTarget. A related option — not referenced in the addWatchTarget documentation — allows to revert this behaviour.

  eleventyConfig.setUseGitIgnore(false);
  eleventyConfig.addWatchTarget("./folder-in-gitignore/your-watch-target");

It makes perfect sense to skip .gitignore files and folders during a build, but being aware of this behavior might help developers unaware of the inner behavior of 11ty.

therealpecus added a commit to therealpecus/11ty.io that referenced this issue Mar 31, 2020
@zachleat
Copy link
Member

Thank you for the PR!

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

No branches or pull requests

2 participants