vip-go-skeleton
vip-go-skeleton copied to clipboard
Add `node_modules` to `.gitignore`
Node.js-driven development within WordPress plugins and themes means that developers often end up with huge node_modules
folders in their projects. These are used to generate a deployment artifact and almost never need to be committed.
Accidentally committing node_modules
can result in a truly epic number of tracked files and can slow down many operations, both locally and on VIP infrastructure.
I am a little worried about this causing confusion for new customers, wherein they were actually relying on having node_modules committed.
What if we add a .gitignore section in the readme to reduce the chances of unwelcome surprises.
I like the idea of adding to the readme. My main concern here is how the issues that typically stem from this type of thing are very hidden and hard to find/debug.
I'll add though that we were able to find examples of existing codebases loading assets directly from node_modules.
I'm removing the needs review status cause it's been alerting, but I don't think we have a good way forward w/this currently.
How about adding it, but including a comment in the .gitignore
file (and readme) which explains the rare circumstances under which it may need to be commented out?
Whilst it might briefly trip a new customer up in new circumstances, let's go for a sensible default for the majority of customers.