First of all you need to login to register. After calling following command, dialog will start.
npm login
After successful login and doing some changes, you will need to raise the version.
npm version [patch|minor|major]
When everything is ready, simply publish the lib.
npm publish