If you've built a package you want to publish as a public package to npm
you can follow these steps:
- Sign up
- Create an organisation
- Choose the following option
- On the command line, navigate to the root directory of your package
cd /path/to/package
- Authorize the machine to publish a package
npm login
- Publish the package
Assuming you've built the package correctly, you can publish it like this:
npm publish --access public
If you're interested to see a package publish exactly this way, take a look at this repository: