Raynos / function-bind

MIT License
138 stars 27 forks source link

Remove non-essential files from npm package #8

Closed jorrit closed 8 years ago

jorrit commented 8 years ago

The package.json, readme and license files will be included in the npm package regardless of the files setting.

ljharb commented 8 years ago

Every file is essential to include in npm, especially tests. In addition, the files array is very dangerous, because it's easy to accidentally forget to include a critical file in the publish.

jorrit commented 8 years ago

Why is for instance .travis.yml essential?

ljharb commented 8 years ago

That's a fair point - we could certainly create a .npmignore file that removes that tiny tiny file from the publish. I don't really see the benefit tho.

jorrit commented 8 years ago

The benefit is that this change, any many others like it, will reduce the amount of files in node_modules from a lot to less than a lot. For a fairly small site I have 104 .travis.yml files in node_modules. Also, I think the tests and code style configuration files will benefit very little people when they install function-bind as a dependency and most usually as a dependency of a dependency. It however more than doubles the amount of files. And with files this small, it's not the size but the amount that matters. Also see https://github.com/npm/npm/issues/13271

ljharb commented 8 years ago

I agree with https://github.com/feross/is-buffer/pull/14#issuecomment-234710446.

The size of packages and the quantity of files therein is something npm needs to fix, and NOT something package authors should be concerning themselves with