This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-26
Channels
- # announcements (7)
- # babashka (6)
- # beginners (41)
- # clara (27)
- # clerk (2)
- # cljs-dev (6)
- # clojure (121)
- # clojure-europe (31)
- # clojure-nl (2)
- # clojure-norway (98)
- # clojure-uk (12)
- # clojuredesign-podcast (7)
- # conjure (5)
- # cursive (22)
- # holy-lambda (22)
- # hoplon (9)
- # hyperfiddle (19)
- # leiningen (9)
- # malli (4)
- # music (1)
- # nbb (6)
- # off-topic (10)
- # podcasts-discuss (1)
- # polylith (4)
- # re-frame (2)
- # reitit (2)
- # releases (1)
- # sci (1)
- # shadow-cljs (59)
- # sql (9)
- # vim (41)
- # xtdb (23)
no.cjohansen/fontawesome-clj
is a new library for easily rendering https://fontawesome.com/ icons to hiccup in Clojure and ClojureScript: https://github.com/cjohansen/fontawesome-clj
Hi @U9MKYDN4Q, Recently we came to realize that using font-awesome's icons dynamically (using strings) has extremely bloated our bundle size. Looking at your library it seem somewhat dynamic (you can use keyword to render any icon without explicitly requiring it). Do you know if it has any effect on the bundle size?
Yes, in ClojureScript you use the icons/icon macro around the icon name, refer to the examples in the Readme. Only the icons you use this way will be included in the bundle.
The CLJS-related code seems to rely on some fontawesome-icons
resource that isn't there, which results in:
Encountered error when macroexpanding fontawesome.icons/icon.
IllegalArgumentException: Cannot open <nil> as a Reader.
You have probably spent more time on this than I have, but aren't FA's free icons suitable for inclusion in your own sources? Since they're licensed as "CC BY 4.0". The trade-off, of course, is that doing so would shift the work from the users of your library to you when updating to a newer version of FA.