Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Link dependencies in a package or bower file to their GitHub page #184

Open
stefanbuck opened this issue May 2, 2014 · 9 comments
Open
Labels
cross referencing Interlinking between issues, prs, commits, etc render

Comments

@stefanbuck
Copy link

I've created an chrome extension for that, but this should be made available to all GitHub user by default. The idea behind is simple. All dependencies listed in a package.json or bower.json file should be a link to the related GiHub repo page. That's it!

preview

@Mithgol
Copy link

Mithgol commented May 3, 2014

How does GitHub know that ffi npm package corresponds to the http://github.com/rbranson/node-ffi repository, for example?

@stefanbuck
Copy link
Author

With a simple crawler like i do here.

  1. Get a list of all available packages from the npm registry.
  2. Call the npm registry again with the package name to get detailed informations about the package like https://registry.npmjs.org/ffi.
  3. If the package.json is well written, the response contains a field for the repository url. Otherwise
    we need more effort to find the repository url with a github search which compares some meta datas like name description version see

@patcon
Copy link

patcon commented May 3, 2014

I love this idea @stefanbuck! Any objection to the premise of using the registry on-the-fly and caching with local storage?

https://registry.npmjs.org/ffi/latest

Also, see #128

@stefanbuck
Copy link
Author

Yes i have one. Request time. The request time for a single dependency look up can take more than 2sec, dependence on the quality of the package.json file and how much effort we need to find the right repo. The best solutions for me is to crawl the registries and update the extension once per week ;)

@patcon

This comment has been minimized.

@stefanbuck
Copy link
Author

Reply from GitHub:

Hi Stefan,

Thanks for the suggestion! I watched the video you included in the issue, and the
Chrome extension looks great. I'll certainly pass it along to the team. I can't
promise if/when we might implement that, however your feedback has definitely
been recorded.

Let us know if you have any other questions!

Cheers,
Jamie

@stefanbuck
Copy link
Author

Hi guys, there is an update available. require() statements in a .js file will also be linked with the related package.

@TPS TPS added render cross referencing Interlinking between issues, prs, commits, etc labels Feb 28, 2019
@oprogramador
Copy link

@stefanbuck

some of NPM packages don't have a GitHub repo, so in this case, it should redirect to the NPM package page

@stefanbuck
Copy link
Author

stefanbuck commented Mar 13, 2019

That's the case now.

Amazing to see such an old topic popping up 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cross referencing Interlinking between issues, prs, commits, etc render
Projects
None yet
Development

No branches or pull requests

5 participants