Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why? #2

Open
vytenis-nfq opened this issue Mar 7, 2019 · 6 comments
Open

why? #2

vytenis-nfq opened this issue Mar 7, 2019 · 6 comments

Comments

@vytenis-nfq
Copy link

vytenis-nfq commented Mar 7, 2019

Why not just npm info npmf

@rousan
Copy link
Owner

rousan commented Mar 7, 2019

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
Copy link
Author

npm info npmf repository.url

@vytenis-nfq
Copy link
Author

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
Copy link
Owner

rousan commented Mar 7, 2019

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
Copy link
Author

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

@vytenis-nfq
Copy link
Author

vytenis-nfq commented Mar 7, 2019

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"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants