-
Notifications
You must be signed in to change notification settings - Fork 1.6k
trick eleventy into watching generated files #3749
Conversation
Deploy preview for web-dev-staging ready! Built with commit c42018d |
I'd prefer to use .eleventyignore since that's really what it's there for. |
There's a lot we could remove from our .gitignore as well. i think it may have been a template I copied from devsite or something. |
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.
Would like to suggest that we use .eleventyignore (we already have one anyway but I don't think it's actually being used because we don't call eleventyConfig.setUseGitIgnore(false);
)
FWIW on d.c.c. I'm using eleventyignore to ignore generated files in the src directory, so this sorta gels with that approach.
I'm happy to use Eleventy's ignore file. I'll swap over. |
Fixed, changed to ".eleventyignore". |
src/site/_data/.gitignore
Outdated
@@ -0,0 +1,2 @@ | |||
# Temporary files generated by builds that point to our CSS/JS entrypoints. | |||
resource*.json |
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.
I was wondering if this could be moved back to the .gitignore at the root of the project? Are you trying to hide it from git or eleventy?
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.
I moved it back.
The thought was it provides more context being adjacent to the file, irrespective of Eleventy's odd behavior (since we solve that with its own ignore file now). But I honestly don't have a strong opinion.
We also only have one .gitignore
file now.
We had a bug, if we compiled CSS or JS during dev, Eleventy wouldn't rebuild. It was ignoring changes in the top-level
.gitignore
, but some of these files change during dev, and point to the latest JS/CSS.Work around this by tricking Eleventy. The alternative is we create a whole
.eleventyignore
file which mostly mirrors.gitignore
.