Repository navigation
Icons: scaffold catalog entries for new Lottie files - #105
Merged
Merged
Conversation
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.
🔎 Website previewhttps://pr-105--affectionate-goldberg-13a61e.netlify.app Updated for commit dacb25b. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
npm run iconsnow adds a starter entry toicons/catalog.jsonfor everyicons/<name>.jsonthat the catalog does not list yet:id: kebab-case of the name (paperPlane→paper-plane)title: the name as a sentence (Paper plane)category:Otherkeywords: the words of the name plusotherinteraction:hover-replay(the most common one)The script logs each added icon so the entry can be refined (title, category, keywords, interaction).
icons/svg.jsonstays optional.Why
Adding an icon no longer needs a hand-written catalog entry first: drop the Lottie file in
icons/, runnpm run icons, commit. The package types (src/icons.ts), the README list and the website all follow from the catalog.Verified
npm run icons: catalog,src/icons.tsand README gained the entry; a second run changed nothing.npm run website:buildproduced the icon page,.json,.zipand the sitemap entry for the scratch icon.scripts/icons.ts.