Fork me on GitHub
#clerk
<
2024-06-05
>
Casey06:06:15

@sritchie09 In your work getting cljs working with clerk (thanks for that template link btw), did you ever manage to figure out how to expose a fill to cljs at runtime? I want to load a sprite in my cljs quil sketch that's embedded in a clerk notebook. I can't seem to figure out how to get the file available to cljs without hosting it externally and accessing it as a url.

Sam Ritchie15:06:39

I think you figured it out… you’ve got to host it or get it into the viewer somehow as a value , which the base64 solution accomplishes

Casey15:06:45

Yea that works for what I need for now.. but I was hoping you had a slick trick to include it in resources/public/ (or somewhere) and have it picked up by whatever does the http serving for clerk

Sam Ritchie17:06:40

ah! yeah something like that SHOULD work too

Sam Ritchie17:06:04

@U5H74UNSF not sure if there is a way to add extra static resources for clerk/build to grab?

Casey09:06:42

I managed to workaround that limitation by now by base64 encoding the image and parsing it as a data uri 😕

teodorlu16:06:34

Super exiting changes in this one! Looking forward to the next time I get a Clerk-shaped problem.

❤️ 3