With 200+ modules on npm getting 1.5M downloads per month, here are my learnings.
Before Writing a Module
- Search npm for existing solutions
- If you find one, read its code and see if you can improve it
- If it doesn’t do exactly what you need, send a PR
Writing a Neat Package
- Use generator-node or generator-nm
- Make sure your
package.jsonis valid - Have
filesandmainattributes in package.json - Write test cases and integrate with Travis CI
- Use badges from nodei.co and david-dm
- Make your
README.mdgreat with install instructions, API docs, and GIFs - Use release-it for releasing
Getting to the Top
Find trending GitHub projects, extract reusable code into modules, and send PRs!
#node#npm
About Hemanth HM
Hemanth HM is a Sr. Machine Learning Manager at PayPal, Google Developer Expert, TC39 delegate, FOSS advocate, and community leader with a passion for programming, AI, and open-source contributions.