Skip to content

TypeScript, Local Badgen & Icon Updates

Latest
Compare
Choose a tag to compare
@RubbaBoy RubbaBoy released this 25 Nov 04:07
· 6 commits to master since this release
24f4642

BYOB has moved to a local version of Badgen, resulting in about ~2x faster responses on average, and heavily increased stability and reliability. The codebase has also moved to TypeScript for a less painful development process. Icons have also had an overhaul, now URLs are supported, along with Base64 SVG representations of icons. This allows for much greater control over icons, expanding from the few preset icons.

An excerpt from the README demonstrating these changes:

Custom Icon URL

NAME: custom
ICON: 'https://raw.githubusercontent.com/RubbaBoy/BYOBTest/master/icons/dollar.svg'
STATUS: 'Custom Icons'
COLOR: red
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Custom Icon Inline SVG

NAME: custom
ICON: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iI0YwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0xMiAyMS4zNWwtMS40NS0xLjMyQzUuNCAxNS4zNiAyIDEyLjI4IDIgOC41IDIgNS40MiA0LjQyIDMgNy41IDNjMS43NCAwIDMuNDEuODEgNC41IDIuMDlDMTMuMDkgMy44MSAxNC43NiAzIDE2LjUgMyAxOS41OCAzIDIyIDUuNDIgMjIgOC41YzAgMy43OC0zLjQgNi44Ni04LjU1IDExLjU0TDEyIDIxLjM1eiIvPjwvc3ZnPg=='
STATUS: 'Custom Icons'
COLOR: blue
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

The above ICON value is a Base64 encoded representation of a colored SVG Material Icon. This provides for great flexibility, with the benefit of keeping it local. The resulting icon is: