Fork me on GitHub
#announcements
<
2024-02-26
>
henrik14:02:31

Clojure source code scanner plugin for Tailwind. A small NPM lib with a single function that enables scanning the Clojure source files for Tailwind classes, as opposed to scanning the JS output. We started hitting 20-30s Tailwind compile times with our app. Scanning the Clojure source files lowers this a few orders of magnitude to 200-400ms. https://www.npmjs.com/package/@multiplyco/tailwind-clj or yarn add @multiplyco/tailwind-clj

🥳 14
👀 4
❤️ 4
cjohansen15:02:09

I haven't used Tailwind a lot, but I pointed it at my clj/cljc/cljs sources, and it worked out of the box. What does this plugin do that the native compiler doesn't?

henrik15:02:16

If that’s worked for you, no need to use this. We had to point it at the JS output, as it missed stuff otherwise.

cjohansen15:02:27

But did you try pointing it at your Clojure sources?

henrik15:02:52

Yes, it typically missed things with fractions such as 1.5 etc. to be honest, this was three or four years ago though, so it may well have improved. The other thing is that we write our classes as keywords (for autocompletion etc), which may have something to do with it.

isak16:02:25

That is interesting. At my work did it on the minified JS, since that will trim functions that do not get called (which is harder to do by looking at the clojure files).

isak16:02:28

The built-in scanner for tailwind did not work, because we have taken advantage of the hiccup syntax like :div.class-1.class-2

👍 1
henrik17:02:59

I don’t remember if I made provisions for the dot syntax. If not, I will add it.

👍 1
cjohansen17:02:44

@U08JKUHA9 the built-in scanner finds those now 😊

😮 1
isak17:02:36

Ah nice, I'll need to revisit that code

cjohansen17:02:21

It does not recognize keywords however, but other than that it just works

👌 1
henrik17:02:21

The hiccup dot syntax is explicitly a keyword though, isn’t it? Or can it be written as a string?

elken17:02:46

Last I used tailwind with cljs it was picking up keyword classes just fine

cjohansen18:02:47

I may misremember then!

cjohansen18:02:18

I am certain that it works with hiccup style tags with classes (keywords)

henrik18:02:23

This is our app without and with custom extractors. I’ve spent so much time debugging why Tailwind sometimes works and sometimes doesn’t. YMMV of course, but none of it is universally supported with standard Tailwind extractors.

Peter Taoussanis15:02:36

http-kit v2.8.0-RC1 is https://github.com/http-kit/http-kit/releases/tag/v2.8.0-RC1 🎉 >29 improvements from 9 contributors, including: • Support for the latest Ring async and WebSocket APIs • Performance improvements, incl. auto use of JVM 21+ virtual threads when available • Numerous fixes Also out today: • Tempel https://www.taoensso.com/tempel (new data security framework for Clojure) • Nippy https://github.com/taoensso/nippy/releases/tag/v3.4.0-RC2 (the fastest serialization library for Clojure) • Timbre https://github.com/taoensso/timbre/releases/tag/v6.5.0 (pure Clojure/Script logging library) Enjoy!

🎉 23
🙏 2
❤️ 1
🌶️ 1
Kathleen Davis15:02:06

Hi folks. Just a reminder that the deadline for Q2 2024 Clojurists Together Funding is March 4. We're funding up to $44K this round. https://www.clojuriststogether.org/news/call-for-proposals.-february-2024-member-survey/ We're looking forward to more great proposals!

clojurists-together 9
🙏 3
slipset18:02:27

clj-commons/fs 1.6.311 is https://clojars.org/clj-commons/fs/versions/1.6.311 Thanks to @lee for upgrading commons-compress to get rid of the CVEs.

🎉 6
clj-commons 4