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

Make Badges API #4

Closed
noomorph opened this issue May 17, 2017 · 9 comments
Closed

Make Badges API #4

noomorph opened this issue May 17, 2017 · 9 comments

Comments

@noomorph
Copy link

noomorph commented May 17, 2017

Could you develop a Badges API in order to make it possible to include in README something like this, please?

Build Status

But with [size|KBs] instead.

@pastelsky
Copy link
Owner

See badges/shields#941

@Swizz
Copy link

Swizz commented Nov 15, 2017

Hi !

As I am a minimised size impact purist I would love to use the badge on my projects.

I know an attempt was quite made. Isn't the HTTP API not enought ?

https://bundlephobia.com/api/size?package=${package}

As a bunch of Hyperapp core devs are aware about the size of libs, I am ready to work on a PR either on a specific route on bundlephobia website or by making a new official Shields badge as you own wish.

@pastelsky
Copy link
Owner

Thanks for the suggestion @Swizz. As you might be aware, cost-of-modules was rewritten into bundlephobia some time back, and since then, we've had much better caching in place thanks to Cloudflare.

It would be interesting to see how much traffic badges bring to the API. If we can get a high cache hit rate for this usage, I'd love for projects to adore a size badge, with a link back to the bundlephobia page.

@Swizz
Copy link

Swizz commented Nov 16, 2017

We used a lot of things to catch our size impact, bundlesize and co, but we rolled back to manually use gzip+ls. But using a badge to give user an instant feedback of the current state of the lib size could be awesome.

Our main project repo's traffic is between 800 and 1250 hits a day. And our side projects are arround 40 and 200 hits a day per project.

I dont know the bundlephobia traffic but I may think this is a little percent of it. And the caching will do the trick server and client side. We talk about 1200 hits of only 250 unique visitors.

@pastelsky
Copy link
Owner

Cool. Doesn't hurt to try out the badge on one project then.

@Saturate
Copy link

You could cache it on cloudflare pretty easily, this would solve most of the problem.

@Swizz
Copy link

Swizz commented Nov 20, 2017

Now the main question to answer is who will handle the badge ? Bundlephobia or Shields ?

@pastelsky
Copy link
Owner

We should be getting a badge soon. See badges/shields#1391

@pastelsky
Copy link
Owner

Find a badge for your project at your nearest https://shields.io ❤️

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

4 participants