-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
Eleventy (npm/x?) should follow git's rule expressions. #857
Comments
@dsthedev I don't know if you saw and if it's relevant but you can opt out of using .gitignore: @zachleat in the documentation, you say:
Can you provide the rationale for that? Why use the .gitignore folder at all in Eleventy? Isn't this like mixing 2 things which should not be related (the version control and the actual use of the solution)? |
As another anecdote, I ran into some trouble deploying an Eleventy site with Netlify because a nested The I'll probably also switch to an |
I don’t have much time to respond to this as comprehensively as I’d like right now but I will say that the choice to use It was confusing for beginners using |
Also related #2436 |
Please, please document the catches with the |
If an asterisk is used to expand a
.gitignore
's folder rule, Eleventy will not follow that rule and attempts to scan the entirenode_modules/
folder.Steps to Reproduce
.gitignore
file (or simply add the*
to an existing folder's rule):npx eleventy
Expected behavior
Just like git, Eleventy should expand the rule to include both the node modules folder, and any folder that starts with
node_modules
(i.e:node_modules-OLD
).Actual Behavior
Ignore rule is ignored, and 11ty proceeds to scan the "ignored" folders.
Environment:
Fresh install with only a few basic templates. No
.eleventyignore
file either.FWIW
Warning, personal opinion incoming; feel free to ignore!
I just checked the docs for 11ty's ignore rules, and I find it odd that it even attempts to use the
.gitignore
file at all. I only looked because I was scratching my head for a good 20m wondering why my perfectly running basic 11ty install magically stopped working. I've never seen another tool use gits config files like this before, and in my opinion it shouldn't. That ignore file is for git and git alone.Regardless, if using gitignore is a default option, it should follow the same expression rules!
The text was updated successfully, but these errors were encountered: