For Build package:

  • go to my-library folder
  • update version no.
  • run this command for build package :
  • ng build my-library --configuration=production

For Publish library

  • go to lib folder
  • npm publish --access public

For access user to npm

  • npm adduser
  • login through browser