rousan / npmf

Fetch quick info of a npm pacakge using terminal
MIT License
63 stars 4 forks source link

why? #2

Open vytenis-nfq opened 5 years ago

vytenis-nfq commented 5 years ago

Why not just npm info npmf

rousan commented 5 years ago

npm info npmf provides extra info which is not needed and also doesn't provide the quick links like Github repo URL or npm url such that I can visit the link easily instead of opening a new tab and then search on google.

vytenis-nfq commented 5 years ago

npm info npmf repository.url

vytenis-nfq commented 5 years ago

Probably your package should be just a mix of default https://docs.npmjs.com/cli/view.html commands instead including extra dependency like axios and fetching info individually

rousan commented 5 years ago

If you use the mix of npm commands (e.g. npm info react and npm info react repository.url) to fetch single info about a package, then you are spawning multiple processes which may affect your app perf.

vytenis-nfq commented 5 years ago

But you can get all data at once like npm info react --json and just grab all required fields as you do right now :bust_in_silhouette:

vytenis-nfq commented 5 years ago

Or just grab only needed info at once npm info react repository.url version --json

{
  "repository.url": "git+https://github.com/facebook/react.git",
  "version": "16.8.4"
}