Hemanth's Scribes

node

Authoring Node Modules

Author Photo

Hemanth HM

Thumbnail

With 200+ modules on npm getting 1.5M downloads per month, here are my learnings.

Before Writing a Module

  1. Search npm for existing solutions
  2. If you find one, read its code and see if you can improve it
  3. 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.json is valid
  • Have files and main attributes in package.json
  • Write test cases and integrate with Travis CI
  • Use badges from nodei.co and david-dm
  • Make your README.md great 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
Author Photo

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.