then / promise

Bare bones Promises/A+ implementation
https://www.promisejs.org
MIT License
2.58k stars 312 forks source link

Add files to .npmignore #131

Closed fson closed 8 years ago

fson commented 8 years ago

Publish only essential files. This will speed up npm installs that include this package.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 95.783% when pulling f37606d0fc5ae7967c76111ba991c8b68c9c2c2e on fson:patch-1 into 7f33b7bccf07a2da37569095c53d91bea7dbd226 on then:master.

ForbesLindesay commented 8 years ago

Downloading an extra few bytes is never the reason npm install is slow. I'm not sure this is worth doing/maintaining. Also you shouldn't need to npmignore the npmignore.

fson commented 8 years ago

I agree you shouldn't need to npmignore the npmignore, but it gets published anyway. I've opened a PR to fix this in npm: https://github.com/npm/npm/pull/14071

This package was downloaded 4,685,396 times in the last month so unpacking all those small files can add up, but to be honest I haven't measured the impact of this, so if you think it's not worth doing, feel free to close this.

If you'd prefer a whitelist of files to publish (files setting in package.json) instead of a blacklist (npmignore), I can change this PR to add that and remove the npmignore. I think a whitelist is probably easier to maintain and harder to accidentally add new files to the bundle like that.

fson commented 8 years ago

Closing because I haven't measured the actual impact of this change and I think it wouldn't have a significant effect on the installation speed with npm.