-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Comments
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. |
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. |
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. |
Cool. Doesn't hurt to try out the badge on one project then. |
You could cache it on cloudflare pretty easily, this would solve most of the problem. |
Now the main question to answer is who will handle the badge ? Bundlephobia or Shields ? |
We should be getting a badge soon. See badges/shields#1391 |
Find a badge for your project at your nearest https://shields.io ❤️ |
Could you develop a Badges API in order to make it possible to include in README something like this, please?
But with [size|KBs] instead.
The text was updated successfully, but these errors were encountered: