Raynos / function-bind

MIT License
139 stars 27 forks source link

Add npmignore using dmn #12

Closed maxnordlund closed 5 years ago

maxnordlund commented 5 years ago

This adds a .npmignore file using dmn, which is a tool for this purpose. It includes .gitignore, as .npmignore overrides that, but it also ignores a few more files used in development.

Why do you need this you may ask? This package is very popular, and at time of this commit has 6,179,098 weekly downloads. This makes every byte really count. Let us ask dmn how much this would save:

$ dmn clean -f
dmn@2.1.0
INFO: Searching for items to clean (it may take a while for big projects)...
INFO: 5 item(s) are set for deletion
INFO: Deleting...
OK: Done! Your node_modules directory size was 25.75 Kb but now it's 6.64 Kb which is 74.2% less.

Now take that times the number of weekly downloads and you would save around 118.083 Gb. Not bad for such a small change.

For a more detailed anlysis done fairly recently in April last year see: https://www.sciencedirect.com/science/article/pii/S2214629618301051 (pdf)