Skip to content

Icons: scaffold catalog entries for new Lottie files - #105

Merged
tuanphungcz merged 2 commits into
mainfrom
icons-auto-catalog
Oct 11, 2026
Merged

tuanphungcz merged 2 commits into
mainfrom
icons-auto-catalog

Conversation

@tuanphungcz

Copy link
Copy Markdown
Collaborator

What

npm run icons now adds a starter entry to icons/catalog.json for every icons/<name>.json that the catalog does not list yet:

  • id: kebab-case of the name (paperPlane → paper-plane)
  • title: the name as a sentence (Paper plane)
  • category: Other
  • keywords: the words of the name plus other
  • interaction: hover-replay (the most common one)

The script logs each added icon so the entry can be refined (title, category, keywords, interaction). icons/svg.json stays optional.

Why

Adding an icon no longer needs a hand-written catalog entry first: drop the Lottie file in icons/, run npm run icons, commit. The package types (src/icons.ts), the README list and the website all follow from the catalog.

Verified

  • Copied an existing Lottie file to a scratch icon, ran npm run icons: catalog, src/icons.ts and README gained the entry; a second run changed nothing.
  • npm run website:build produced the icon page, .json, .zip and the sitemap entry for the scratch icon.
  • Scratch data removed afterwards; the diff is only scripts/icons.ts.

npm run icons now adds a starter entry to icons/catalog.json for every
icons/<name>.json the catalog does not list yet (category Other, interaction
hover-replay, title and keywords from the name), so dropping a Lottie file in
icons/ is enough for the package types, the README and the website.
@github-actions

Copy link
Copy Markdown

🔎 Website preview

https://pr-105--affectionate-goldberg-13a61e.netlify.app

Updated for commit dacb25b.

@tuanphungcz
tuanphungcz merged commit d27dc80 into main Oct 11, 2026
7 checks passed
@tuanphungcz
tuanphungcz deleted the icons-auto-catalog branch October 11, 2026 17:12

This branch was successfully deployed

1 active deployment
preview — dacb25b1 Deployed Oct 11, 2026 by tuanphungcz via preview #53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant