juliangruber / ghub.io

http://ghub.io/<package-name> redirects to a npm package's GitHub page, if available.
http://ghub.io
54 stars 12 forks source link

Add support for scoped packages #24

Closed fregante closed 6 years ago

fregante commented 7 years ago

Example:

https://www.npmjs.com/package/@shinnn/eslint-config-nodehttps://github.com/shinnn/eslint-config-nodehttp://ghub.io/@shinnn/eslint-config-node

zeke commented 7 years ago

The skimdb endpoint doesn't serve up scoped packages. There's a new endpoint for that: replicate.npmjs.com

https://github.com/nice-registry/package-stream is what I use to consume it:

const registry = require('package-stream')()

registry
  .on('package', function (pkg) {
    // nice clean package object
  })
  .on('up-to-date', function () {
    // consumed all changes (for now)
    // The stream will remain open and continue receiving package
    // updates from the registry as they occur in real time.
  })
juliangruber commented 7 years ago

that module looks sweet! we should use this instead, together with the leveldb package cache

fregante commented 6 years ago

Seems to work now!

http://ghub.io/@shinnn/eslint-config-node

zeke commented 6 years ago

Yo @bfred-it just FYI the new canonical repo is https://github.com/nice-registry/ghub.io

fregante commented 6 years ago

Best to move/archive this one then

zeke commented 6 years ago

archive this one

good call