0xa3k5 / token-icons Goto Github PK
View Code? Open in Web Editor NEWThe most comprehensive source for cryptocurrency token & network logos as React components and SVGs.
Home Page: https://tokenicons.io
License: MIT License
The most comprehensive source for cryptocurrency token & network logos as React components and SVGs.
Home Page: https://tokenicons.io
License: MIT License
I've tried to build this myself, but I couldn't succeed.
There is a script add-icons which accepts a string as the second parameter and runs validation checks, finds matching rawdata and updates the relevant metadata.json with the correct object structure.
The github action should be triggered on:
and then should:
packages/core/src/raw-svgs/
with the last commit of main
and pass the modified or newly added paths to the add-icons
script:bun run add-icons {{SVG_PATHS}}
afterwards the action should build the packages
bun run build --filter=@token-icons/react --filter=@token-icons/core
write a commit message with the newly added svgs and commit to the trigger (to pull request or directly to the main brach)
the draft version of this action can be found under icon-add.yml
name: icon-add
permissions:
contents: write
pull-requests: write
on:
push:
branches:
- main
paths:
- 'packages/core/src/raw-svgs/**'
pull_request:
branches:
- main
paths:
- 'packages/core/src/raw-svgs/**'
jobs:
update-and-rebuild:
runs-on: ubuntu-latest
steps:
- name: Setup bun
uses: oven-sh/setup-bun@v1
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: bun install
- name: Identify New SVG Files
id: files
run: |
SVG_FILES=$(git diff --name-only HEAD^ HEAD | grep 'packages/core/src/raw-svgs/' | tr '\n' ',')
echo "SVG_FILES=${SVG_FILES%,}" >> $GITHUB_ENV
echo "New SVG Files: $SVG_FILES"
echo "New Token Icons: $newTokenIcons"
echo "New Network Icons: $newNetworkIcons"
- name: Update Metadata
if: env.SVG_FILES
run: |
newTokenIcons=$(git diff --name-only HEAD^ HEAD | grep 'packages/core/src/raw-svgs/tokens/' | xargs basename -a | sed 's/.svg//' | sort -u | tr '\n' ', ' | sed 's/, $//')
newNetworkIcons=$(git diff --name-only HEAD^ HEAD | grep 'packages/core/src/raw-svgs/networks/' | xargs basename -a | sed 's/.svg//' | sort -u | tr '\n' ', ' | sed 's/, $//')
echo "newTokenIcons=$newTokenIcons" >> $GITHUB_ENV
echo "newNetworkIcons=$newNetworkIcons" >> $GITHUB_ENV
bun run ./packages/utils/src/scripts/add-icons.ts ${{ env.SVG_FILES }}
- name: Build Packages
run: |
bun run build --filter=@tknicns/core --filter=@tknicns/react
- name: Commit Changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
commitMessage=""
description=""
if [ -n "$newTokenIcons" ] && [ -n "$newNetworkIcons" ]; then
commitMessage="core: add new token icons & network icons"
description+="token icons: $newTokenIcons\nnetwork icons: $newNetworkIcons"
elif [ -n "$newTokenIcons" ]; then
commitMessage="core: add new token icons"
description+="token icons: $newTokenIcons"
elif [ -n "$newNetworkIcons" ]; then
commitMessage="core: add new network icons"
description+="network icons: $newNetworkIcons"
fi
if [ -n "$description" ]; then
git commit -m "$commitMessage" -m "$description" || echo "No changes to commit"
else
echo "No new icons to commit"
fi
git push origin ${GITHUB_HEAD_REF:-${GITHUB_REF}}
Hello again!
Summary:
The TokenIcons.io website is experiencing significant performance issues, including general slowness and frequent freezing during user interactions. Icons also stop loading after ~30 rows, website stops responding after ~5 seconds.
Steps to Reproduce:
Expected Result:
The website should respond quickly and smoothly to user actions without any noticeable delays or freezes.
Actual Result:
Severity:
Low-Moderate; I personally mostly use token-icons as an NPM package, but tokenicons.io is a useful tool to see which icons are available.The Figma Plugin still works great (Congrats on 4.5k installs ๐๐ฅ), so there is a workaround.
Browser: Chrome (Version 125.0.6422.76),
Operating System: Windows 11
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.