bevry/badges

Showcase a demo of how these badges look?

Naereen opened this issue · 6 comments

Hi,
I'm surprised to not see any screenshot or live webpage that showcase this library?
Actually I don't understand how I could use it.
Thanks for the details!
(I have been curious about SVG/PNG badges for years, and am the author of https://github.com/Naereen/badges/)

The badges in the project readme are rendered via projectz which uses this package for the rendering

Hi.
Which badges on the README?
The "sponsor" badges? https://github.com/bevry/badges#sponsors
Are there more?

The first things you see in the readme after the title

3A6AC8D9-15EF-4FCC-A99F-C4E97EBB5F63

OK. But I still don't get the purpose of this library.
From what I can see, in the README.md file, there are lines such as

<span class="badge-npmversion"><a href="https://npmjs.org/package/badges" title="View this project on NPM"><img src="https://img.shields.io/npm/v/badges.svg" alt="NPM version" /></a></span>

but this library is in javascript so it is intended to be used in a webpage or in command line with npm?

  • If i want to use it to add badges in a webpage, what should I do?
  • If I want to use it to add badges in my README, what should I do? (without using https://github.com/bevry/projectz)

Thanks

JavaScript, TypeScript and WASM can all use each other, they are interoperable.

Deno and Node.js are desktop engines for them, allowing desktop and CLI apps, in addition to the usual Web Browser engine they usually run in.

Most languages compile to WASM, and thus can interoperate with this package too, without the necessity of a CLI.

That is what makes JavaScript/TypeScript/WASM the universal language as they target everywhere.

As such, this library is written in them and has been for years, so provide a definitive and universal programmatic rendering of all the badges that have come to be (if any missing then please add the code to render them).

This goes further than just a markdown listing, as it allows customising with typed documentation on how they can be customised.

For instance, projectz consumes this package to render the "badges" field in package.json files into the <!-- BADGES --> comment elements inside the readme. This allows much simpler rendering of the badges than copy pasting and looking up the reference documentation for the remote badge renderer.

I would suggest for you and your project maintainers to add any missing badges to this library, such that they can be programmatically rendered by all consumers of this package and the ecosystem that depends upon it.

I can also make a feature request for a CLI if that will make accessibility to the badges ecosystem easier.

If you wish for any more clarification please get a meeting with me after Tuesday via https://balupton.com/meet

OK thanks...