npmnpm-init

What is the usage of the git repository question when running npm init?


When running npm init you are asked for the git repository (of your project I assume).

I am wondering why? What is the use case to have the git repository url of the project - where the package.json is already in - also in the package.json?

There must be a reason for it right?


Solution

  • when you are publishing your package to NPM repository there is a link to the git repository inside the package page.