Giving back to the open source community is rite of passage for every developer and npm is a great ecosystem for taking that leap. You don't need something worth sharing to get started though, you simply need to follow a few easy steps. We'll assume you're starting a "new" package, though in most cases packages are derived from existing applications.
- Have a public git repostory where your source code and documentation will reside.
- Create a folder for your package:
mkdir my-package && cd my-package
- Initialize a local git repo and sync it up:
git init && git remote add origin [email protected]:User/UserRepo.git
- Initialize an npm package with
npm init
. Follow the instructions on the prompt, remembering a few key things:
- The package name needs to be unique! You can check if the name is taken by running
npm view