Git Product home page Git Product logo

npmhub's Introduction

npmhub

On every GitHub repository or folder with a package.json file, scroll to the bottom of the page to see a list of its npm dependencies and their descriptions.

npmhub also adds convenient links to:

  • the package.json file
  • npmjs.com
  • RunKit to test the package
  • BundlePhobia to see the package size when bundled
  • PackagePhobia to see the package size when installed
  • NPMGraph to explore the sub-dependencies
  • UNPKG to see the exact contents published to npm

GitHub Enterprise is also supported by right-clicking on npmhub's icon in the toolbar and selecting Enable npmhub on this domain.

Installation

Chrome and other Chromium browsers

Firefox including Firefox Android

Safari on Mac, iOS and iPadOS

If you love npmhub, consider sponsoring or hiring the maintainer @fregante

Design

Here's what npmhub looks like:

npmhub on Chrome

See Also

  • GhostText - An extension to use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
  • packagehub - An extension for displaying dependencies for different package managers on GitHub.
  • ghub.io - A URL shortener to jump straight to the GitHub repo of an npm package, e.g. ghub.io/express.

npmhub's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

npmhub's Issues

Introspect path to package.json

The current package.json is resolved by this string:

  const pkgUrl = `https://github.com/${user}/${repo}/blob/master/package.json`;

That fails for:

  • modules that are developed on branches other than master, e.g. stable or develop (#18)
  • Lerna-shaped monorepos, which store Node modules in packages/${ moduleName }/.

You're already querying for .files [title="package.json"]. You can reuse that query to get the path to package.json:

const packageLink = document.querySelector('.files [title="package.json"]');

if (packageLink) {
  const pkgUrl = packageLink.href;

Update logo, screenshots, add promotional material

npmhub currently uses npmhub’s own logo, unchanged. I think it makes sense to at least slightly modify it, perhaps using GitHub’s gray on one side.

I just needed to recreate the icons in higher quality, so I thought about not using npmhub’s unchanged logo.

Screen Shot 2020-11-19 at 18 52 30

<svg height="512" viewBox="0 0 16 16" width="512" xmlns="http://www.w3.org/2000/svg">
	<path fill="#c12127" d="M0 16V0h16v16zM3 3v10h5V5h3v8h2V3z"/>
	<path fill="#333" d="M0 16L16 16 16 0z"/>
	<path fill="#fff" d="M3 3h10v10h-2V5H8v8H3z"/>
</svg>

Thoughts or alternative designs (in SVG) before I change this everywhere?

Fast navigation will break npmhub

Opening a repo, switching to issues, then navigating back will show npmhub in a "loading" state because its loading has been halted.

Related to #63

It doesn't work if GitHub defers loading of the file list

If GitHub decides to load the file list asynchronously, npmhub won't see the file and won't appear.

This happens on:

Similar problem: #106

Solution: use select + MutationObserver to detect a deferred load and wait for it
https://github.com/sindresorhus/refined-github/blob/master/source/github-events/on-file-list-update.ts

GitLab support

Did you plan to support GitLab ?

It could be nice to support both GitHub and GitLab as octotree does.

Autodeployment automation

Currently the deployment steps are:

  1. Update the version in extension/manifest.json
  2. Create a commit for it
  3. Create a tag with the same version

If you're ok with it, I can skip the first two steps by dynamically update the version during deployment (without committing it)

You can see it in action on my GitHub Clean Feed:

Limit extension to github.com

This is currently being applied to all websites, generating console errors and appending crossrider_data_store_temp attributes on body everywhere. It should be limited to the github.com domain only.

Remove use of jquery

This extension would be much smaller, faster, and easier to maintain without jquery imo.

Use browserify

It'd be easier to test the extension (since we'll have modules that can be unit tested) and easier use modules from npm if the project used browserify. This would also make #37 easier to do.

Versions don't show

First, congrats on the nice idea. The extension is a must-have.

My issue is that I can see the versions of the dependencies only if I use the extension as unpacked extension.
If I use the version from Chrome Web Store, then I cannot see the versions.

I tested it on two browsers: Chromium 53 and Chrome 55 under Ubuntu 16
For both browsers, the result is the same.

On a side-note, Chrome cries a warning:

Unrecognized manifest key 'applications'

when I upload the files.

REACT - not working npm while installing it

Did all the command on command line from installing the npm globally npm install -g create-react-app along with following codes:

npx create-react-app and also cleared the npm cache but it always get stuck on the line in the image showing the following error. Along with the error:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ npm update check failed β”‚
β”‚ Try running with sudo or get access β”‚
β”‚ to the local update config store via β”‚
β”‚ sudo chown -R $USER:$(id -gn $USER) C:\Users\Smart Sites.config β”‚
└──────────────────────────────────────────────────────────────────
along with 65 packages are looking for funding [1]: https://i.stack.imgur.com/KJVVp.png

Duplicate lists on the main repo page after navigating away and back

While testing #100 I noticed that if you load https://github.com/npmhub/npmhub, then navigate to https://github.com/npmhub/npmhub/blob/master/package.json, then use the back button to return to the main page the list of dependencies shows twice. Do it again and it'll show three times etc. I'm not seeing this behavior on the package.json page, only on the main repo page with the readme.

This is happening in both Chrome and FireFox on Windows 10.

npmhub stopped working

I just noticed this today. Something is up with the JSON response. Doesn't look like npmhub has changed recently. Any ideas, @bfred-it?

screen shot 2017-08-09 at 1 09 00 pm

screen shot 2017-08-09 at 1 09 21 pm

Support custom NPM registry

I'd like the option of specifying an alternate NPM registry to do the lookups from if possible. I'm in an enterprise environment. Authorizing my enterprise github works well, however we also have an enterprise NPM registry :) So would like to support that as well.

Add CONTRIBUTING.md file

It would be nice if there was some CONTRIBUTING.md to explain guidelines and provide help for contributing.

Use GitHub API with personal token

  • Add personal GitHub token field in options
  • Make GitHub requests to GitHub's API (which is at https://api.github.com or /api on GHE, I think)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.