Closed dominykas closed 5 years ago
While I don't think that one approach is definitely better than the other, I do prefer the .npmignore
file because it works well, I would rather not update all the repositories, and it is in parity with .eslintignore
and .gitignore
ignoring mechanisms. I also have seen issues when folks are too explicit in files
and end-up not publishing some files that they actually intended to—I would rather publish some project files that I did not intend to (e.g. tests/docs) than have a broken version out there. That said, I do think it's primarily a matter of opinion/style, and I will be happy to go with the flow if others prefer it.
I've been looking at the differences, and there seems to be none. That's basically merging those files with no obvious win. I never minded the extra file and I fail to see how this is more explicit, except for the fact that a blacklist (that we're using as a whitelist) would become a "true" whitelist.
PS: The documentation of that feature is not that good on npmjs.com, https://github.com/npm/npm/wiki/Files-and-Ignores is better in regards to usable patterns.
I like less files. If this option was available when we added all those ugly ignore files, I would have voted for this new option. That said, I think this is one thing we can allow maintainers to decide on their own.
Call this OCD, but having one less file in the root folder makes me happier, and this feels a little more explicit?