Fork me on GitHub
#shadow-cljs
<
2023-04-05
>
az16:04:19

Hi all, I have an html -> pdf workflow I need to build and because it's a thirdparty that will render, I need to deliver html and css, no js since it won't wait for rendering. I read a thread on no static site gen in shadow, and to instead just render html statically from clj. I'm trying to figure out the best workflow though for livereload and testing since the pdfs will be design heavy. Want to add tailwind and having postcss in my standard shadow setup is so great, want to see if I can recreate that somehow but with static gen. Any thoughts on how I might set something like this up?

thheller17:04:57

really not much of a shadow-cljs question. it just builds the code, how you run that code is up to you. I don't have any particular recommendation, I do all server side stuff in clj.

az17:04:18

Thank you

Ben Lieberman17:04:11

Hey I'm getting the stale output warning and I'm not sure why. I have a running watch and the JS is behaving like I would expect? I did change this HTML file to a PHP file, could that cause issues?

Aron18:04:24

your server and client are built out of step. It's likely you either have a cached frontend or something similar ongoing

thheller19:04:30

php file is fine, but maybe while changing it you also changed paths or something

thheller19:04:35

and now loading the old output?

Ben Lieberman19:04:57

Yeah i screwed up the asset path. Got it working now, thanks

Aron19:04:08

I am not able to make this thing work with shadow-cljs https://github.com/rauhs/hicada it says

The required namespace "hicada.compiler" is not available, it was required by "ui/hiccup.cljc".
"hicada/compiler.clj" was found on the classpath. Maybe this library only supports CLJ?

thheller19:04:12

maybe you are using an older version?

thheller19:04:52

there is a .cljc and no .clj file? so I'm guessing you are on an old version

Aron19:04:53

[hicada "0.1.9"]]

Aron19:04:14

not sure what I am doing here

Aron19:04:53

can hook up a minimal reproduction, but maybe not worth it. I just need something to parse hiccup with into react createElement on node and in the browser, maybe another lib will work

thheller19:04:31

maybe try (:require-macros [hicada.compiler])? doesn't seem to have a cljs variant, so :require will fail

Aron19:04:35

can someone confirm maybe that it's incompatible please? 🙂

Sam Ritchie22:04:13

404 | #_{:clj-kondo/ignore [:redefined-var]}
 405 | (do (ns-unmap 'emmy.quaternion '->Quaternion)
----------^---------------------------------------------------------------------
 Partial alias created for namespace emmy.quaternion, possibly due to await/yield transpilation.
This may prevent optimization of anything nested under this namespace.
See  for more details.
is this a sign that I should not be calling ns-unmap here? https://github.com/mentat-collective/emmy/blob/ac6e444abe626d044beb14a5ef7417f65ba556d8/src/emmy/quaternion.cljc#L405-L413