From 4e28aa0981f2886b756d492efad901e1065546b7 Mon Sep 17 00:00:00 2001 From: Jan Kollars Date: Fri, 27 Aug 2021 12:50:14 +0200 Subject: [PATCH] create script which generates json file with icon data --- dist/icons.json | 1 + package.json | 5 +++-- write-icon-data.js | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 dist/icons.json create mode 100644 write-icon-data.js diff --git a/dist/icons.json b/dist/icons.json new file mode 100644 index 00000000..9a776afd --- /dev/null +++ b/dist/icons.json @@ -0,0 +1 @@ +{"500px":{"types":["logos"]},"adobe":{"types":["logos"]},"airbnb":{"types":["logos"]},"algolia":{"types":["logos"]},"amazon":{"types":["logos"]},"android":{"types":["logos"]},"angular":{"types":["logos"]},"apple":{"types":["logos"]},"audible":{"types":["logos"]},"aws":{"types":["logos"]},"baidu":{"types":["logos"]},"behance":{"types":["logos"]},"bing":{"types":["logos"]},"bitcoin":{"types":["logos","regular"]},"blender":{"types":["logos"]},"blogger":{"types":["logos"]},"bootstrap":{"types":["logos"]},"c-plus-plus":{"types":["logos"]},"chrome":{"types":["logos"]},"codepen":{"types":["logos"]},"creative-commons":{"types":["logos"]},"css3":{"types":["logos"]},"dailymotion":{"types":["logos"]},"dev-to":{"types":["logos"]},"deviantart":{"types":["logos"]},"digg":{"types":["logos"]},"digitalocean":{"types":["logos"]},"discord-alt":{"types":["logos"]},"discord":{"types":["logos"]},"discourse":{"types":["logos"]},"django":{"types":["logos"]},"docker":{"types":["logos"]},"dribbble":{"types":["logos"]},"dropbox":{"types":["logos"]},"drupal":{"types":["logos"]},"ebay":{"types":["logos"]},"edge":{"types":["logos"]},"etsy":{"types":["logos"]},"facebook-circle":{"types":["logos"]},"facebook-square":{"types":["logos"]},"facebook":{"types":["logos"]},"figma":{"types":["logos"]},"firebase":{"types":["logos"]},"firefox":{"types":["logos"]},"flickr-square":{"types":["logos"]},"flickr":{"types":["logos"]},"flutter":{"types":["logos"]},"foursquare":{"types":["logos"]},"git":{"types":["logos"]},"github":{"types":["logos"]},"gitlab":{"types":["logos"]},"google-cloud":{"types":["logos"]},"google-plus-circle":{"types":["logos"]},"google-plus":{"types":["logos"]},"google":{"types":["logos"]},"html5":{"types":["logos"]},"imdb":{"types":["logos"]},"instagram-alt":{"types":["logos"]},"instagram":{"types":["logos"]},"internet-explorer":{"types":["logos"]},"invision":{"types":["logos"]},"javascript":{"types":["logos"]},"joomla":{"types":["logos"]},"jquery":{"types":["logos"]},"jsfiddle":{"types":["logos"]},"kickstarter":{"types":["logos"]},"kubernetes ":{"types":["logos"]},"less":{"types":["logos"]},"linkedin-square":{"types":["logos"]},"linkedin":{"types":["logos"]},"magento":{"types":["logos"]},"mailchimp":{"types":["logos"]},"markdown":{"types":["logos"]},"mastercard":{"types":["logos"]},"mastodon":{"types":["logos"]},"medium-old":{"types":["logos"]},"medium-square":{"types":["logos"]},"medium":{"types":["logos"]},"messenger":{"types":["logos"]},"microsoft-teams":{"types":["logos"]},"microsoft":{"types":["logos"]},"nodejs":{"types":["logos"]},"ok-ru":{"types":["logos"]},"opera":{"types":["logos"]},"patreon":{"types":["logos"]},"paypal":{"types":["logos"]},"periscope":{"types":["logos"]},"php":{"types":["logos"]},"pinterest-alt":{"types":["logos"]},"pinterest":{"types":["logos"]},"play-store":{"types":["logos"]},"pocket":{"types":["logos"]},"product-hunt":{"types":["logos"]},"python":{"types":["logos"]},"quora":{"types":["logos"]},"react":{"types":["logos"]},"redbubble":{"types":["logos"]},"reddit":{"types":["logos"]},"redux":{"types":["logos"]},"sass":{"types":["logos"]},"shopify":{"types":["logos"]},"sketch":{"types":["logos"]},"skype":{"types":["logos"]},"slack-old":{"types":["logos"]},"slack":{"types":["logos"]},"snapchat":{"types":["logos"]},"soundcloud":{"types":["logos"]},"spotify":{"types":["logos"]},"spring-boot":{"types":["logos"]},"squarespace":{"types":["logos"]},"stack-overflow":{"types":["logos"]},"steam":{"types":["logos"]},"stripe":{"types":["logos"]},"tailwind-css":{"types":["logos"]},"telegram":{"types":["logos"]},"tiktok":{"types":["logos"]},"trello":{"types":["logos"]},"trip-advisor":{"types":["logos"]},"tumblr":{"types":["logos"]},"tux":{"types":["logos"]},"twitch":{"types":["logos"]},"twitter":{"types":["logos"]},"unity":{"types":["logos"]},"unsplash":{"types":["logos"]},"vimeo":{"types":["logos"]},"visa":{"types":["logos"]},"visual-studio":{"types":["logos"]},"vk":{"types":["logos"]},"vuejs":{"types":["logos"]},"whatsapp-square":{"types":["logos"]},"whatsapp":{"types":["logos"]},"wikipedia":{"types":["logos"]},"windows":{"types":["logos","regular"]},"wix":{"types":["logos"]},"wordpress":{"types":["logos"]},"yahoo":{"types":["logos"]},"yelp":{"types":["logos"]},"youtube":{"types":["logos"]},"zoom":{"types":["logos"]},"abacus":{"types":["regular"]},"accessibility":{"types":["regular"]},"add-to-queue":{"types":["regular","solid"]},"adjust":{"types":["regular","solid"]},"alarm-add":{"types":["regular","solid"]},"alarm-exclamation":{"types":["regular","solid"]},"alarm-off":{"types":["regular","solid"]},"alarm-snooze":{"types":["regular","solid"]},"alarm":{"types":["regular","solid"]},"album":{"types":["regular","solid"]},"align-justify":{"types":["regular"]},"align-left":{"types":["regular"]},"align-middle":{"types":["regular"]},"align-right":{"types":["regular"]},"analyse":{"types":["regular","solid"]},"anchor":{"types":["regular"]},"angry":{"types":["regular","solid"]},"aperture":{"types":["regular"]},"arch":{"types":["regular","solid"]},"archive-in":{"types":["regular","solid"]},"archive-out":{"types":["regular","solid"]},"archive":{"types":["regular","solid"]},"area":{"types":["regular","solid"]},"arrow-back":{"types":["regular"]},"arrow-from-bottom":{"types":["regular","solid"]},"arrow-from-left":{"types":["regular","solid"]},"arrow-from-right":{"types":["regular","solid"]},"arrow-from-top":{"types":["regular","solid"]},"arrow-to-bottom":{"types":["regular","solid"]},"arrow-to-left":{"types":["regular","solid"]},"arrow-to-right":{"types":["regular","solid"]},"arrow-to-top":{"types":["regular","solid"]},"at":{"types":["regular"]},"atom":{"types":["regular"]},"award":{"types":["regular","solid"]},"badge-check":{"types":["regular","solid"]},"badge":{"types":["regular","solid"]},"ball":{"types":["regular","solid"]},"band-aid":{"types":["regular","solid"]},"bar-chart-alt-2":{"types":["regular","solid"]},"bar-chart-alt":{"types":["regular"]},"bar-chart-square":{"types":["regular","solid"]},"bar-chart":{"types":["regular"]},"barcode-reader":{"types":["regular"]},"barcode":{"types":["regular","solid"]},"baseball ":{"types":["regular"]},"basket":{"types":["regular","solid"]},"basketball":{"types":["regular","solid"]},"bath":{"types":["regular","solid"]},"battery":{"types":["regular","solid"]},"bed":{"types":["regular","solid"]},"been-here":{"types":["regular","solid"]},"beer":{"types":["regular","solid"]},"bell-minus":{"types":["regular","solid"]},"bell-off":{"types":["regular","solid"]},"bell-plus":{"types":["regular","solid"]},"bell":{"types":["regular","solid"]},"bible":{"types":["regular","solid"]},"blanket":{"types":["regular","solid"]},"block":{"types":["regular"]},"bluetooth":{"types":["regular"]},"body":{"types":["regular"]},"bold":{"types":["regular"]},"bolt-circle":{"types":["regular","solid"]},"bomb":{"types":["regular","solid"]},"bone":{"types":["regular","solid"]},"bong":{"types":["regular","solid"]},"book-add":{"types":["regular","solid"]},"book-alt":{"types":["regular","solid"]},"book-bookmark":{"types":["regular","solid"]},"book-content":{"types":["regular","solid"]},"book-heart":{"types":["regular","solid"]},"book-open":{"types":["regular","solid"]},"book-reader":{"types":["regular","solid"]},"book":{"types":["regular","solid"]},"bookmark-alt-minus":{"types":["regular","solid"]},"bookmark-alt-plus":{"types":["regular","solid"]},"bookmark-alt":{"types":["regular","solid"]},"bookmark-heart":{"types":["regular","solid"]},"bookmark-minus":{"types":["regular","solid"]},"bookmark-plus":{"types":["regular","solid"]},"bookmark":{"types":["regular","solid"]},"bookmarks":{"types":["regular","solid"]},"border-all":{"types":["regular"]},"border-bottom":{"types":["regular"]},"border-inner":{"types":["regular"]},"border-left":{"types":["regular"]},"border-none":{"types":["regular"]},"border-outer":{"types":["regular"]},"border-radius":{"types":["regular"]},"border-right":{"types":["regular"]},"border-top":{"types":["regular"]},"bot":{"types":["regular","solid"]},"bowling-ball":{"types":["regular","solid"]},"box":{"types":["regular","solid"]},"bracket":{"types":["regular"]},"braille":{"types":["regular"]},"brain":{"types":["regular","solid"]},"briefcase-alt-2":{"types":["regular","solid"]},"briefcase-alt":{"types":["regular","solid"]},"briefcase":{"types":["regular","solid"]},"brightness-half":{"types":["regular","solid"]},"brightness":{"types":["regular","solid"]},"broadcast":{"types":["regular"]},"brush-alt":{"types":["regular","solid"]},"brush":{"types":["regular","solid"]},"bug-alt":{"types":["regular","solid"]},"bug":{"types":["regular","solid"]},"building-house":{"types":["regular","solid"]},"building":{"types":["regular","solid"]},"buildings":{"types":["regular","solid"]},"bulb":{"types":["regular","solid"]},"bullseye":{"types":["regular","solid"]},"buoy":{"types":["regular","solid"]},"bus-school":{"types":["regular","solid"]},"bus":{"types":["regular","solid"]},"cabinet":{"types":["regular","solid"]},"cake":{"types":["regular","solid"]},"calculator":{"types":["regular","solid"]},"calendar-alt":{"types":["regular","solid"]},"calendar-check":{"types":["regular","solid"]},"calendar-edit":{"types":["regular","solid"]},"calendar-event":{"types":["regular","solid"]},"calendar-exclamation":{"types":["regular","solid"]},"calendar-heart":{"types":["regular","solid"]},"calendar-minus":{"types":["regular","solid"]},"calendar-plus":{"types":["regular","solid"]},"calendar-star":{"types":["regular","solid"]},"calendar-week":{"types":["regular","solid"]},"calendar-x":{"types":["regular","solid"]},"calendar":{"types":["regular","solid"]},"camera-home":{"types":["regular","solid"]},"camera-movie":{"types":["regular","solid"]},"camera-off":{"types":["regular","solid"]},"camera":{"types":["regular","solid"]},"capsule":{"types":["regular","solid"]},"captions":{"types":["regular","solid"]},"car":{"types":["regular","solid"]},"card":{"types":["regular","solid"]},"caret-down-circle":{"types":["regular","solid"]},"caret-down-square":{"types":["regular","solid"]},"caret-down":{"types":["regular"]},"caret-left-circle":{"types":["regular","solid"]},"caret-left-square":{"types":["regular","solid"]},"caret-left":{"types":["regular"]},"caret-right-circle":{"types":["regular","solid"]},"caret-right-square":{"types":["regular","solid"]},"caret-right":{"types":["regular"]},"caret-up-circle":{"types":["regular","solid"]},"caret-up-square":{"types":["regular","solid"]},"caret-up":{"types":["regular"]},"carousel":{"types":["regular","solid"]},"cart-alt":{"types":["regular","solid"]},"cart":{"types":["regular","solid"]},"cast":{"types":["regular"]},"category-alt":{"types":["regular","solid"]},"category":{"types":["regular","solid"]},"cctv":{"types":["regular","solid"]},"certification":{"types":["regular","solid"]},"chair":{"types":["regular"]},"chalkboard":{"types":["regular","solid"]},"chart":{"types":["regular","solid"]},"chat":{"types":["regular","solid"]},"check-circle":{"types":["regular","solid"]},"check-double":{"types":["regular"]},"check-shield":{"types":["regular","solid"]},"check-square":{"types":["regular","solid"]},"check":{"types":["regular"]},"checkbox-checked":{"types":["regular","solid"]},"checkbox-minus":{"types":["regular","solid"]},"checkbox-square":{"types":["regular"]},"checkbox":{"types":["regular","solid"]},"chevron-down-circle":{"types":["regular","solid"]},"chevron-down-square":{"types":["regular","solid"]},"chevron-down":{"types":["regular","solid"]},"chevron-left-circle":{"types":["regular","solid"]},"chevron-left-square":{"types":["regular","solid"]},"chevron-left":{"types":["regular","solid"]},"chevron-right-circle":{"types":["regular","solid"]},"chevron-right-square":{"types":["regular","solid"]},"chevron-right":{"types":["regular","solid"]},"chevron-up-circle":{"types":["regular","solid"]},"chevron-up-square":{"types":["regular","solid"]},"chevron-up":{"types":["regular","solid"]},"chevrons-down":{"types":["regular","solid"]},"chevrons-left":{"types":["regular","solid"]},"chevrons-right":{"types":["regular","solid"]},"chevrons-up":{"types":["regular","solid"]},"chip":{"types":["regular","solid"]},"church":{"types":["regular","solid"]},"circle":{"types":["regular","solid"]},"clinic":{"types":["regular","solid"]},"clipboard":{"types":["regular"]},"closet":{"types":["regular"]},"cloud-download":{"types":["regular","solid"]},"cloud-drizzle":{"types":["regular"]},"cloud-light-rain":{"types":["regular"]},"cloud-lightning":{"types":["regular","solid"]},"cloud-rain":{"types":["regular","solid"]},"cloud-snow":{"types":["regular"]},"cloud-upload":{"types":["regular","solid"]},"cloud":{"types":["regular","solid"]},"code-alt":{"types":["regular"]},"code-block":{"types":["regular"]},"code-curly":{"types":["regular"]},"code":{"types":["regular"]},"coffee-togo":{"types":["regular","solid"]},"coffee":{"types":["regular","solid"]},"cog":{"types":["regular","solid"]},"coin-stack":{"types":["regular","solid"]},"coin":{"types":["regular","solid"]},"collapse":{"types":["regular"]},"collection":{"types":["regular","solid"]},"color-fill":{"types":["regular","solid"]},"columns":{"types":["regular"]},"command":{"types":["regular"]},"comment-add":{"types":["regular","solid"]},"comment-check":{"types":["regular","solid"]},"comment-detail":{"types":["regular","solid"]},"comment-dots":{"types":["regular","solid"]},"comment-edit":{"types":["regular","solid"]},"comment-error":{"types":["regular","solid"]},"comment-minus":{"types":["regular","solid"]},"comment-x":{"types":["regular","solid"]},"comment":{"types":["regular","solid"]},"compass":{"types":["regular","solid"]},"confused":{"types":["regular","solid"]},"conversation":{"types":["regular","solid"]},"cookie":{"types":["regular","solid"]},"cool":{"types":["regular","solid"]},"copy-alt":{"types":["regular","solid"]},"copy":{"types":["regular","solid"]},"copyright":{"types":["regular","solid"]},"credit-card-alt":{"types":["regular","solid"]},"credit-card-front":{"types":["regular","solid"]},"credit-card":{"types":["regular","solid"]},"crop":{"types":["regular","solid"]},"crosshair":{"types":["regular"]},"crown":{"types":["regular","solid"]},"cube-alt":{"types":["regular","solid"]},"cube":{"types":["regular","solid"]},"cuboid":{"types":["regular","solid"]},"current-location":{"types":["regular"]},"customize":{"types":["regular","solid"]},"cut":{"types":["regular"]},"cycling":{"types":["regular"]},"cylinder":{"types":["regular","solid"]},"data":{"types":["regular","solid"]},"desktop":{"types":["regular"]},"detail":{"types":["regular","solid"]},"devices":{"types":["regular","solid"]},"dialpad-alt":{"types":["regular"]},"dialpad":{"types":["regular"]},"diamond":{"types":["regular","solid"]},"dice-1":{"types":["regular","solid"]},"dice-2":{"types":["regular","solid"]},"dice-3":{"types":["regular","solid"]},"dice-4":{"types":["regular","solid"]},"dice-5":{"types":["regular","solid"]},"dice-6":{"types":["regular","solid"]},"directions":{"types":["regular","solid"]},"disc":{"types":["regular","solid"]},"dish":{"types":["regular","solid"]},"dislike":{"types":["regular","solid"]},"dizzy":{"types":["regular","solid"]},"dna":{"types":["regular"]},"dock-bottom":{"types":["regular","solid"]},"dock-left":{"types":["regular","solid"]},"dock-right":{"types":["regular","solid"]},"dock-top":{"types":["regular","solid"]},"dollar-circle":{"types":["regular","solid"]},"dollar":{"types":["regular"]},"donate-blood":{"types":["regular","solid"]},"donate-heart":{"types":["regular","solid"]},"door-open":{"types":["regular","solid"]},"dots-horizontal-rounded":{"types":["regular"]},"dots-horizontal":{"types":["regular"]},"dots-vertical-rounded":{"types":["regular"]},"dots-vertical":{"types":["regular"]},"doughnut-chart":{"types":["regular","solid"]},"down-arrow-alt":{"types":["regular","solid"]},"down-arrow-circle":{"types":["regular","solid"]},"down-arrow":{"types":["regular","solid"]},"download":{"types":["regular","solid"]},"downvote":{"types":["regular","solid"]},"drink":{"types":["regular","solid"]},"droplet":{"types":["regular","solid"]},"dumbbell":{"types":["regular"]},"duplicate":{"types":["regular","solid"]},"edit-alt":{"types":["regular","solid"]},"edit":{"types":["regular","solid"]},"envelope-open":{"types":["regular","solid"]},"envelope":{"types":["regular","solid"]},"equalizer":{"types":["regular"]},"eraser":{"types":["regular","solid"]},"error-alt":{"types":["regular","solid"]},"error-circle":{"types":["regular","solid"]},"error":{"types":["regular","solid"]},"euro":{"types":["regular"]},"exclude":{"types":["regular"]},"exit-fullscreen":{"types":["regular"]},"exit":{"types":["regular","solid"]},"expand-alt":{"types":["regular"]},"expand":{"types":["regular"]},"export":{"types":["regular"]},"extension":{"types":["regular","solid"]},"face":{"types":["regular","solid"]},"fast-forward-circle":{"types":["regular","solid"]},"fast-forward":{"types":["regular"]},"female-sign":{"types":["regular"]},"female":{"types":["regular"]},"file-blank":{"types":["regular","solid"]},"file-find":{"types":["regular","solid"]},"file":{"types":["regular","solid"]},"film":{"types":["regular","solid"]},"filter-alt":{"types":["regular","solid"]},"filter":{"types":["regular"]},"fingerprint":{"types":["regular"]},"first-aid":{"types":["regular","solid"]},"first-page":{"types":["regular"]},"flag":{"types":["regular","solid"]},"folder-minus":{"types":["regular","solid"]},"folder-open":{"types":["regular","solid"]},"folder-plus":{"types":["regular","solid"]},"folder":{"types":["regular","solid"]},"font-color":{"types":["regular"]},"font-family":{"types":["regular"]},"font-size":{"types":["regular"]},"font":{"types":["regular"]},"food-menu":{"types":["regular","solid"]},"food-tag":{"types":["regular"]},"football":{"types":["regular"]},"fridge":{"types":["regular","solid"]},"fullscreen":{"types":["regular"]},"game":{"types":["regular","solid"]},"gas-pump":{"types":["regular","solid"]},"ghost":{"types":["regular","solid"]},"gift":{"types":["regular","solid"]},"git-branch":{"types":["regular"]},"git-commit":{"types":["regular"]},"git-compare":{"types":["regular"]},"git-merge":{"types":["regular"]},"git-pull-request":{"types":["regular"]},"git-repo-forked":{"types":["regular"]},"glasses-alt":{"types":["regular"]},"glasses":{"types":["regular"]},"globe-alt":{"types":["regular"]},"globe":{"types":["regular"]},"grid-alt":{"types":["regular","solid"]},"grid-horizontal":{"types":["regular"]},"grid-small":{"types":["regular"]},"grid-vertical":{"types":["regular"]},"grid":{"types":["regular","solid"]},"group":{"types":["regular","solid"]},"handicap":{"types":["regular"]},"happy-alt":{"types":["regular","solid"]},"happy-beaming":{"types":["regular","solid"]},"happy-heart-eyes":{"types":["regular","solid"]},"happy":{"types":["regular","solid"]},"hash":{"types":["regular"]},"hdd":{"types":["regular","solid"]},"heading":{"types":["regular"]},"headphone":{"types":["regular"]},"health":{"types":["regular"]},"heart-circle":{"types":["regular","solid"]},"heart-square":{"types":["regular","solid"]},"heart":{"types":["regular","solid"]},"help-circle":{"types":["regular","solid"]},"hide":{"types":["regular","solid"]},"highlight":{"types":["regular"]},"history":{"types":["regular"]},"hive":{"types":["regular"]},"home-alt":{"types":["regular"]},"home-circle":{"types":["regular","solid"]},"home-heart":{"types":["regular","solid"]},"home-smile":{"types":["regular","solid"]},"home":{"types":["regular","solid"]},"horizontal-center":{"types":["regular"]},"hotel":{"types":["regular","solid"]},"hourglass":{"types":["regular","solid"]},"id-card":{"types":["regular","solid"]},"image-add":{"types":["regular","solid"]},"image-alt":{"types":["regular","solid"]},"image":{"types":["regular","solid"]},"images":{"types":["regular"]},"import":{"types":["regular"]},"infinite":{"types":["regular"]},"info-circle":{"types":["regular","solid"]},"info-square":{"types":["regular","solid"]},"intersect":{"types":["regular"]},"italic":{"types":["regular"]},"joystick-alt":{"types":["regular","solid"]},"joystick-button":{"types":["regular","solid"]},"joystick":{"types":["regular","solid"]},"key":{"types":["regular","solid"]},"label":{"types":["regular","solid"]},"landscape":{"types":["regular","solid"]},"laptop":{"types":["regular"]},"last-page":{"types":["regular"]},"laugh":{"types":["regular","solid"]},"layer-minus":{"types":["regular","solid"]},"layer-plus":{"types":["regular","solid"]},"layer":{"types":["regular","solid"]},"layout":{"types":["regular","solid"]},"left-arrow-alt":{"types":["regular","solid"]},"left-arrow-circle":{"types":["regular","solid"]},"left-arrow":{"types":["regular","solid"]},"left-down-arrow-circle":{"types":["regular","solid"]},"left-indent":{"types":["regular"]},"left-top-arrow-circle":{"types":["regular","solid"]},"library":{"types":["regular"]},"like":{"types":["regular","solid"]},"line-chart-down":{"types":["regular"]},"line-chart":{"types":["regular"]},"link-alt":{"types":["regular"]},"link-external":{"types":["regular"]},"link":{"types":["regular"]},"lira":{"types":["regular"]},"list-check":{"types":["regular"]},"list-minus":{"types":["regular"]},"list-ol":{"types":["regular"]},"list-plus":{"types":["regular"]},"list-ul":{"types":["regular"]},"loader-alt":{"types":["regular"]},"loader-circle":{"types":["regular"]},"loader":{"types":["regular"]},"location-plus":{"types":["regular","solid"]},"lock-alt":{"types":["regular","solid"]},"lock-open-alt":{"types":["regular","solid"]},"lock-open":{"types":["regular","solid"]},"lock":{"types":["regular","solid"]},"log-in-circle":{"types":["regular","solid"]},"log-in":{"types":["regular","solid"]},"log-out-circle":{"types":["regular","solid"]},"log-out":{"types":["regular","solid"]},"low-vision":{"types":["regular","solid"]},"magnet":{"types":["regular","solid"]},"mail-send":{"types":["regular"]},"male-sign":{"types":["regular"]},"male":{"types":["regular"]},"map-alt":{"types":["regular","solid"]},"map-pin":{"types":["regular","solid"]},"map":{"types":["regular","solid"]},"mask":{"types":["regular","solid"]},"medal":{"types":["regular","solid"]},"meh-alt":{"types":["regular","solid"]},"meh-blank":{"types":["regular","solid"]},"meh":{"types":["regular","solid"]},"memory-card":{"types":["regular","solid"]},"menu-alt-left":{"types":["regular"]},"menu-alt-right":{"types":["regular"]},"menu":{"types":["regular"]},"merge":{"types":["regular"]},"message-add":{"types":["regular","solid"]},"message-alt-add":{"types":["regular","solid"]},"message-alt-check":{"types":["regular","solid"]},"message-alt-detail":{"types":["regular","solid"]},"message-alt-dots":{"types":["regular","solid"]},"message-alt-edit":{"types":["regular","solid"]},"message-alt-error":{"types":["regular","solid"]},"message-alt-minus":{"types":["regular","solid"]},"message-alt-x":{"types":["regular","solid"]},"message-alt":{"types":["regular","solid"]},"message-check":{"types":["regular","solid"]},"message-detail":{"types":["regular","solid"]},"message-dots":{"types":["regular","solid"]},"message-edit":{"types":["regular","solid"]},"message-error":{"types":["regular","solid"]},"message-minus":{"types":["regular","solid"]},"message-rounded-add":{"types":["regular","solid"]},"message-rounded-check":{"types":["regular","solid"]},"message-rounded-detail":{"types":["regular","solid"]},"message-rounded-dots":{"types":["regular","solid"]},"message-rounded-edit":{"types":["regular","solid"]},"message-rounded-error":{"types":["regular","solid"]},"message-rounded-minus":{"types":["regular","solid"]},"message-rounded-x":{"types":["regular","solid"]},"message-rounded":{"types":["regular","solid"]},"message-square-add":{"types":["regular","solid"]},"message-square-check":{"types":["regular","solid"]},"message-square-detail":{"types":["regular","solid"]},"message-square-dots":{"types":["regular","solid"]},"message-square-edit":{"types":["regular","solid"]},"message-square-error":{"types":["regular","solid"]},"message-square-minus":{"types":["regular","solid"]},"message-square-x":{"types":["regular","solid"]},"message-square":{"types":["regular","solid"]},"message-x":{"types":["regular","solid"]},"message":{"types":["regular","solid"]},"meteor":{"types":["regular","solid"]},"microchip":{"types":["regular","solid"]},"microphone-off":{"types":["regular","solid"]},"microphone":{"types":["regular","solid"]},"minus-back":{"types":["regular"]},"minus-circle":{"types":["regular","solid"]},"minus-front":{"types":["regular"]},"minus":{"types":["regular"]},"mobile-alt":{"types":["regular"]},"mobile-landscape":{"types":["regular"]},"mobile-vibration":{"types":["regular","solid"]},"mobile":{"types":["regular","solid"]},"money":{"types":["regular"]},"moon":{"types":["regular","solid"]},"mouse-alt":{"types":["regular","solid"]},"mouse":{"types":["regular","solid"]},"move-horizontal":{"types":["regular"]},"move-vertical":{"types":["regular"]},"move":{"types":["regular"]},"movie-play":{"types":["regular","solid"]},"movie":{"types":["regular","solid"]},"music":{"types":["regular","solid"]},"navigation":{"types":["regular","solid"]},"network-chart":{"types":["regular","solid"]},"news":{"types":["regular","solid"]},"no-entry":{"types":["regular","solid"]},"note":{"types":["regular","solid"]},"notepad":{"types":["regular","solid"]},"notification-off":{"types":["regular","solid"]},"notification":{"types":["regular","solid"]},"outline":{"types":["regular"]},"package":{"types":["regular","solid"]},"paint-roll":{"types":["regular","solid"]},"paint":{"types":["regular","solid"]},"palette":{"types":["regular","solid"]},"paper-plane":{"types":["regular","solid"]},"paperclip":{"types":["regular"]},"paragraph":{"types":["regular"]},"paste":{"types":["regular","solid"]},"pause-circle":{"types":["regular"]},"pause":{"types":["regular"]},"pen":{"types":["regular","solid"]},"pencil":{"types":["regular","solid"]},"phone-call":{"types":["regular","solid"]},"phone-incoming":{"types":["regular","solid"]},"phone-off":{"types":["regular","solid"]},"phone-outgoing":{"types":["regular","solid"]},"phone":{"types":["regular","solid"]},"photo-album":{"types":["regular","solid"]},"pie-chart-alt-2":{"types":["regular","solid"]},"pie-chart-alt":{"types":["regular","solid"]},"pie-chart":{"types":["regular","solid"]},"pin":{"types":["regular","solid"]},"planet":{"types":["regular","solid"]},"play-circle":{"types":["regular"]},"play":{"types":["regular"]},"plug":{"types":["regular","solid"]},"plus-circle":{"types":["regular","solid"]},"plus-medical":{"types":["regular"]},"plus":{"types":["regular"]},"podcast":{"types":["regular"]},"pointer":{"types":["regular","solid"]},"poll":{"types":["regular"]},"polygon":{"types":["regular","solid"]},"pound":{"types":["regular"]},"power-off":{"types":["regular"]},"printer":{"types":["regular","solid"]},"pulse":{"types":["regular"]},"purchase-tag-alt":{"types":["regular","solid"]},"purchase-tag":{"types":["regular","solid"]},"pyramid":{"types":["regular","solid"]},"qr-scan":{"types":["regular"]},"qr":{"types":["regular"]},"question-mark":{"types":["regular"]},"radar":{"types":["regular"]},"radio-circle-marked":{"types":["regular"]},"radio-circle":{"types":["regular"]},"radio":{"types":["regular","solid"]},"receipt":{"types":["regular","solid"]},"rectangle":{"types":["regular","solid"]},"recycle":{"types":["regular"]},"redo":{"types":["regular"]},"refresh":{"types":["regular"]},"registered":{"types":["regular","solid"]},"rename":{"types":["regular","solid"]},"repeat":{"types":["regular"]},"reply-all":{"types":["regular"]},"reply":{"types":["regular"]},"repost":{"types":["regular"]},"reset":{"types":["regular"]},"restaurant":{"types":["regular"]},"revision":{"types":["regular"]},"rewind-circle":{"types":["regular","solid"]},"rewind":{"types":["regular"]},"right-arrow-alt":{"types":["regular","solid"]},"right-arrow-circle":{"types":["regular","solid"]},"right-arrow":{"types":["regular","solid"]},"right-down-arrow-circle":{"types":["regular","solid"]},"right-indent":{"types":["regular"]},"right-top-arrow-circle":{"types":["regular","solid"]},"rocket":{"types":["regular","solid"]},"rotate-left":{"types":["regular"]},"rotate-right":{"types":["regular"]},"rss":{"types":["regular"]},"ruble":{"types":["regular"]},"ruler":{"types":["regular","solid"]},"run":{"types":["regular"]},"rupee":{"types":["regular"]},"sad":{"types":["regular","solid"]},"save":{"types":["regular","solid"]},"scan":{"types":["regular"]},"screenshot":{"types":["regular"]},"search-alt-2":{"types":["regular","solid"]},"search-alt":{"types":["regular"]},"search":{"types":["regular","solid"]},"select-multiple":{"types":["regular","solid"]},"selection":{"types":["regular"]},"send":{"types":["regular","solid"]},"server":{"types":["regular","solid"]},"shape-circle":{"types":["regular"]},"shape-polygon":{"types":["regular"]},"shape-square":{"types":["regular"]},"shape-triangle":{"types":["regular"]},"share-alt":{"types":["regular","solid"]},"share":{"types":["regular","solid"]},"shekel":{"types":["regular"]},"shield-alt-2":{"types":["regular","solid"]},"shield-alt":{"types":["regular"]},"shield-quarter":{"types":["regular"]},"shield-x":{"types":["regular","solid"]},"shield":{"types":["regular","solid"]},"shocked":{"types":["regular","solid"]},"shopping-bag":{"types":["regular","solid"]},"show-alt":{"types":["regular"]},"show":{"types":["regular","solid"]},"shuffle":{"types":["regular"]},"sidebar":{"types":["regular"]},"sitemap":{"types":["regular"]},"skip-next-circle":{"types":["regular","solid"]},"skip-next":{"types":["regular"]},"skip-previous-circle":{"types":["regular","solid"]},"skip-previous":{"types":["regular"]},"sleepy":{"types":["regular","solid"]},"slider-alt":{"types":["regular"]},"slider":{"types":["regular"]},"slideshow":{"types":["regular","solid"]},"smile":{"types":["regular","solid"]},"sort-a-z":{"types":["regular"]},"sort-alt-2":{"types":["regular"]},"sort-down":{"types":["regular"]},"sort-up":{"types":["regular"]},"sort-z-a":{"types":["regular"]},"sort":{"types":["regular"]},"spa":{"types":["regular","solid"]},"space-bar":{"types":["regular"]},"speaker":{"types":["regular","solid"]},"spray-can":{"types":["regular","solid"]},"spreadsheet":{"types":["regular","solid"]},"square-rounded":{"types":["regular","solid"]},"square":{"types":["regular","solid"]},"star":{"types":["regular","solid"]},"station":{"types":["regular"]},"stats":{"types":["regular"]},"sticker":{"types":["regular","solid"]},"stop-circle":{"types":["regular"]},"stop":{"types":["regular"]},"stopwatch":{"types":["regular","solid"]},"store-alt":{"types":["regular","solid"]},"store":{"types":["regular","solid"]},"street-view":{"types":["regular"]},"strikethrough":{"types":["regular"]},"subdirectory-left":{"types":["regular"]},"subdirectory-right":{"types":["regular"]},"sun":{"types":["regular","solid"]},"support":{"types":["regular"]},"swim":{"types":["regular"]},"sync":{"types":["regular"]},"tab":{"types":["regular"]},"table":{"types":["regular"]},"tachometer":{"types":["regular","solid"]},"tag-alt":{"types":["regular","solid"]},"tag":{"types":["regular","solid"]},"target-lock":{"types":["regular"]},"task-x":{"types":["regular"]},"task":{"types":["regular"]},"taxi":{"types":["regular","solid"]},"tennis-ball":{"types":["regular","solid"]},"terminal":{"types":["regular","solid"]},"test-tube":{"types":["regular"]},"text":{"types":["regular"]},"time-five":{"types":["regular","solid"]},"time":{"types":["regular","solid"]},"timer":{"types":["regular","solid"]},"tired":{"types":["regular","solid"]},"toggle-left":{"types":["regular","solid"]},"toggle-right":{"types":["regular","solid"]},"tone":{"types":["regular","solid"]},"traffic-cone":{"types":["regular","solid"]},"train":{"types":["regular","solid"]},"transfer-alt":{"types":["regular"]},"transfer":{"types":["regular"]},"trash-alt":{"types":["regular","solid"]},"trash":{"types":["regular","solid"]},"trending-down":{"types":["regular"]},"trending-up":{"types":["regular"]},"trim":{"types":["regular"]},"trip":{"types":["regular"]},"trophy":{"types":["regular","solid"]},"tv":{"types":["regular","solid"]},"underline":{"types":["regular"]},"undo":{"types":["regular"]},"unite":{"types":["regular"]},"unlink":{"types":["regular"]},"up-arrow-alt":{"types":["regular","solid"]},"up-arrow-circle":{"types":["regular","solid"]},"up-arrow":{"types":["regular","solid"]},"upload":{"types":["regular"]},"upside-down":{"types":["regular","solid"]},"upvote":{"types":["regular","solid"]},"usb":{"types":["regular"]},"user-check":{"types":["regular","solid"]},"user-circle":{"types":["regular","solid"]},"user-minus":{"types":["regular","solid"]},"user-pin":{"types":["regular","solid"]},"user-plus":{"types":["regular","solid"]},"user-voice":{"types":["regular","solid"]},"user-x":{"types":["regular","solid"]},"user":{"types":["regular","solid"]},"vector":{"types":["regular","solid"]},"vertical-center":{"types":["regular"]},"vial":{"types":["regular","solid"]},"video-off":{"types":["regular","solid"]},"video-plus":{"types":["regular","solid"]},"video-recording":{"types":["regular","solid"]},"video":{"types":["regular","solid"]},"voicemail":{"types":["regular"]},"volume-full":{"types":["regular","solid"]},"volume-low":{"types":["regular","solid"]},"volume-mute":{"types":["regular","solid"]},"volume":{"types":["regular","solid"]},"walk":{"types":["regular"]},"wallet-alt":{"types":["regular","solid"]},"wallet":{"types":["regular","solid"]},"water":{"types":["regular"]},"webcam":{"types":["regular","solid"]},"wifi-0":{"types":["regular"]},"wifi-1":{"types":["regular"]},"wifi-2":{"types":["regular"]},"wifi-off":{"types":["regular"]},"wifi":{"types":["regular"]},"wind":{"types":["regular"]},"window-alt":{"types":["regular","solid"]},"window-close":{"types":["regular"]},"window-open":{"types":["regular"]},"window":{"types":["regular"]},"wine":{"types":["regular","solid"]},"wink-smile":{"types":["regular","solid"]},"wink-tongue":{"types":["regular","solid"]},"won":{"types":["regular"]},"world":{"types":["regular"]},"wrench":{"types":["regular","solid"]},"x-circle":{"types":["regular","solid"]},"x":{"types":["regular"]},"yen":{"types":["regular"]},"zoom-in":{"types":["regular","solid"]},"zoom-out":{"types":["regular","solid"]},"adjust-alt":{"types":["solid"]},"ambulance":{"types":["solid"]},"baby-carriage":{"types":["solid"]},"backpack":{"types":["solid"]},"badge-dollar":{"types":["solid"]},"bank":{"types":["solid"]},"baseball":{"types":["solid"]},"battery-charging":{"types":["solid"]},"battery-full":{"types":["solid"]},"battery-low":{"types":["solid"]},"bell-ring":{"types":["solid"]},"binoculars":{"types":["solid"]},"bolt":{"types":["solid"]},"bookmark-star":{"types":["solid"]},"business":{"types":["solid"]},"camera-plus":{"types":["solid"]},"car-battery":{"types":["solid"]},"car-crash":{"types":["solid"]},"car-garage":{"types":["solid"]},"car-mechanic":{"types":["solid"]},"car-wash":{"types":["solid"]},"cart-add":{"types":["solid"]},"cart-download":{"types":["solid"]},"chess":{"types":["solid"]},"city":{"types":["solid"]},"coffee-alt":{"types":["solid"]},"component":{"types":["solid"]},"contact":{"types":["solid"]},"coupon":{"types":["solid"]},"dashboard":{"types":["solid"]},"direction-left":{"types":["solid"]},"direction-right":{"types":["solid"]},"discount":{"types":["solid"]},"down-arrow-square":{"types":["solid"]},"droplet-half":{"types":["solid"]},"dryer":{"types":["solid"]},"edit-location":{"types":["solid"]},"eject":{"types":["solid"]},"ev-station":{"types":["solid"]},"eyedropper":{"types":["solid"]},"face-mask":{"types":["solid"]},"factory":{"types":["solid"]},"file-archive":{"types":["solid"]},"file-css":{"types":["solid"]},"file-doc":{"types":["solid"]},"file-export":{"types":["solid"]},"file-gif":{"types":["solid"]},"file-html":{"types":["solid"]},"file-image":{"types":["solid"]},"file-import":{"types":["solid"]},"file-jpg":{"types":["solid"]},"file-js":{"types":["solid"]},"file-json":{"types":["solid"]},"file-md":{"types":["solid"]},"file-pdf":{"types":["solid"]},"file-plus":{"types":["solid"]},"file-png":{"types":["solid"]},"file-txt":{"types":["solid"]},"flag-alt":{"types":["solid"]},"flag-checkered":{"types":["solid"]},"flame":{"types":["solid"]},"flask":{"types":["solid"]},"florist":{"types":["solid"]},"graduation":{"types":["solid"]},"guitar-amp":{"types":["solid"]},"hand-down":{"types":["solid"]},"hand-left":{"types":["solid"]},"hand-right":{"types":["solid"]},"hand-up":{"types":["solid"]},"hand":{"types":["solid"]},"hot":{"types":["solid"]},"hourglass-bottom":{"types":["solid"]},"hourglass-top":{"types":["solid"]},"inbox":{"types":["solid"]},"institution":{"types":["solid"]},"keyboard":{"types":["solid"]},"landmark":{"types":["solid"]},"left-arrow-square":{"types":["solid"]},"magic-wand":{"types":["solid"]},"megaphone":{"types":["solid"]},"microphone-alt":{"types":["solid"]},"minus-square":{"types":["solid"]},"offer":{"types":["solid"]},"parking":{"types":["solid"]},"piano":{"types":["solid"]},"pizza":{"types":["solid"]},"plane-alt":{"types":["solid"]},"plane-land":{"types":["solid"]},"plane-take-off":{"types":["solid"]},"plane":{"types":["solid"]},"playlist":{"types":["solid"]},"plus-square":{"types":["solid"]},"quote-alt-left":{"types":["solid"]},"quote-alt-right":{"types":["solid"]},"quote-left":{"types":["solid"]},"quote-right":{"types":["solid"]},"quote-single-left":{"types":["solid"]},"quote-single-right":{"types":["solid"]},"radiation":{"types":["solid"]},"report":{"types":["solid"]},"right-arrow-square":{"types":["solid"]},"school":{"types":["solid"]},"shapes":{"types":["solid"]},"ship":{"types":["solid"]},"shopping-bag-alt":{"types":["solid"]},"shopping-bags":{"types":["solid"]},"skull":{"types":["solid"]},"sort-alt":{"types":["solid"]},"star-half":{"types":["solid"]},"t-shirt":{"types":["solid"]},"tag-x":{"types":["solid"]},"thermometer":{"types":["solid"]},"to-top":{"types":["solid"]},"torch":{"types":["solid"]},"traffic-barrier":{"types":["solid"]},"traffic":{"types":["solid"]},"tree":{"types":["solid"]},"truck":{"types":["solid"]},"up-arrow-square":{"types":["solid"]},"user-account":{"types":["solid"]},"user-badge":{"types":["solid"]},"user-detail":{"types":["solid"]},"user-rectangle":{"types":["solid"]},"videos":{"types":["solid"]},"virus-block":{"types":["solid"]},"virus":{"types":["solid"]},"washer":{"types":["solid"]},"watch-alt":{"types":["solid"]},"watch":{"types":["solid"]},"widget":{"types":["solid"]},"x-square":{"types":["solid"]},"yin-yang":{"types":["solid"]},"zap":{"types":["solid"]}} \ No newline at end of file diff --git a/package.json b/package.json index ed52749a..28013f68 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "description": "High Quality Web Icons", "scripts": { "start": "webpack-dev-server --history-api-fallback --hot --open", - "build": "webpack -p ", - "optimize-svg": "svgo --config=svgo.config.js -f svg/regular && svgo --config=svgo.config.js -f svg/logos && svgo --config=svgo.config.js -f svg/solid" + "build": "npm run generate-icon-data && webpack -p ", + "optimize-svg": "svgo --config=svgo.config.js -f svg/regular && svgo --config=svgo.config.js -f svg/logos && svgo --config=svgo.config.js -f svg/solid", + "generate-icon-data": "node write-icon-data.js" }, "repository": { "type": "git", diff --git a/write-icon-data.js b/write-icon-data.js new file mode 100644 index 00000000..0d973427 --- /dev/null +++ b/write-icon-data.js @@ -0,0 +1,37 @@ +const fs = require('fs'); +const path = require('path'); + +/** + * @typedef {Object} IconData + * @property {string[]} type + */ + +/** @type {Object.} */ +const icons = {}; + +const iconRootDirectory = path.join(__dirname, 'svg'); +const outputFile = path.join(__dirname, 'dist', 'icons.json'); + +/** @type {string[]} */ +const categories = fs + .readdirSync(iconRootDirectory, { withFileTypes: true }) + .filter(dirent => dirent.isDirectory()) + .map(dirent => dirent.name); + +categories.forEach((category) => { + const foundSVGs = fs + .readdirSync(path.join(iconRootDirectory, category)) + .filter(fileName => fileName.endsWith('.svg')); + foundSVGs.forEach((fileName) => { + const svgKey = fileName.slice(fileName.indexOf('-') + 1, -4); + if (Object.hasOwnProperty.call(icons, svgKey)) { + icons[svgKey].types.push(category); + } else { + icons[svgKey] = { + types: [category], + }; + } + }); +}); + +fs.writeFileSync(outputFile, JSON.stringify(icons));