Katex: Add size badge

Created on 11 Dec 2017  路  10Comments  路  Source: KaTeX/KaTeX

https://github.com/ngryman/badge-size

We'd want to show both minified and gzipped size.

Most helpful comment

@daniellimws Actually, tagged (release) commit has it, e.g., https://github.com/Khan/KaTeX/tree/v0.9.0/dist. And you can display the size of katex.min.js of v0.9.0, for example, like: ![](http://img.badgesize.io/Khan/KaTeX/v0.9.0/dist/katex.min.js).

All 10 comments

HI @kevinbarabash! Which file would you like to show the size of?

@santos22 I was thinking katex.min.js.

According to badge-size, the file needs to be in the repository. However, I can't seem to find it. Is it in the repository?

Not sure if requiring maintainers to update it upon every commit is a good idea.

No, it's not (and for merge conflict sake, I don't think we want to). It's in the release. Is there an NPM-based badge tool?

The closest I could find is
npm bundle size (minified + gzip)
which gives the size of the minified and gzipped npm bundle.

@daniellimws Actually, tagged (release) commit has it, e.g., https://github.com/Khan/KaTeX/tree/v0.9.0/dist. And you can display the size of katex.min.js of v0.9.0, for example, like: ![](http://img.badgesize.io/Khan/KaTeX/v0.9.0/dist/katex.min.js).

Oh, it's on master too -- presumably from the last release. I stand corrected!

Ok so we'll need to remember to be updating the size badge after every release.

@daniellimws No, we shouldn't have to remember anything. It could be part of the release script, though.

Oh cool I'll make a PR for this some time tomorrow, while updating the release script.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mpolyak picture mpolyak  路  3Comments

q2apro picture q2apro  路  3Comments

pvnr0082t picture pvnr0082t  路  4Comments

msridhar picture msridhar  路  3Comments

HughGrovesArup picture HughGrovesArup  路  4Comments