3rd-Eden / node-hashring

hashring is a consistent hashing algorithm for Node.js that is compatible with libketama and python's hash_ring package
MIT License
350 stars 61 forks source link

Ignore tests dir when publishing #52

Open cesine opened 4 years ago

cesine commented 4 years ago

We noticed the test fixtures were in our production docker container

$ du -k node_modules/* | awk '$1 > 2000' | sort -nr # 2MB
4700  node_modules/hashring
4608  node_modules/@shutterstock
4596  node_modules/hashring/tests
4576  node_modules/hashring/tests/fixtures

Currently npm publish is using your .gitignore since there is no .npmignore provided https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package

This pr adds an .npmignore (based on your .gitignore to keep the existing functionality, with the tests directory excluded)