[go: up one dir, main page]

github-cdn

1.0.0-rc.3 • Public • Published

🛰 Github CDN GitHub stars

Github CDN is UNPKG for Github — an unofficial content delivery network for repo assets on Github.

Designed to provide:

  • an endpoint to retrieve branches/tags/PRs of a repo
  • an easy way to serve dev code before publishing them
  • access to npm excluded files
  • immediate (micro-cached) access to new changes pushed to Github *
  • Node API for compatibility with Github Enterprise

* Unless the request fails due to network failure or rate-limiting

💁‍♀️ Endpoints

  • /:owner/:repo

    • Get the default branch and all refs (branches, tags, and PRs)
    • eg. /vuejs/vue to retrieve meta data on vuejs/vue
    Example output
    {
        "default_branch": "master",
        "refs": {
            "heads": { ... },
            "tags": { ... },
            "pull": { ... }
        }
    }
  • /:owner/:repo/:ref

  • /:owner/:repo/:ref?badge

    • Resolves the ref and redirects to Badgen
    • eg. /vuejs/vue/latest?badge Latest Vue badge
  • /:owner/:repo/:ref/:path

  • /ratelimit

    • See the rate limit quota available on the Github API
    • With rate limiting, Github CDN is not a production-ready solution to hosting code

🔑 Setting a custom token (for rate-limiting & private repos)

Configure Github CDN to use your token to access your private repos and your own rate limit quota.

Use the token-input to attach your token to every Github CDN request via browser cookies.


Built and maintained by @privatenumber GitHub followers and powered by Vercel ❤️

Package Sidebar

Install

npm i github-cdn

Weekly Downloads

3

Version

1.0.0-rc.3

License

MIT

Unpacked Size

24.7 kB

Total Files

20

Last publish

Collaborators

  • hirokiosame