Fork me on GitHub
#shadow-cljs
<
2021-02-17
>
Chris McCormick02:02:03

will test out both of these, thanks. @thheller what i am looking for is something that can replace an existing workflow from javascript. i often have a small piece of js in my makefile to just do one thing (like transform markdown into HTML on the server) and i would like to be able to use cljs instead. it would be good if i could just create and run a .cljs file in a node context, rather than having to add a clause to shadow-cljs.edn and run multiple steps. i guess i'm really looking for something like lumo - a cljs interpereter that is pre-compiled into js on node.

thheller09:02:18

@chris358 sounds like babashka might be a good fit? or even just clj? CLJS is only great for this is you have it precompiled and don't need the JVM anymore. Or just lumo. shadow-cljs will always require the JVM to compile so thats not the best fit if you want to compile on-demand

❤️ 6
👍 4
huxley13:02:37

I have a weird error that I don't know what it is

huxley13:02:04

I'm pretty sure it worked before, but I can't find a Shadow version where it actually works

huxley13:02:17

problem only affects meander

thheller13:02:17

@r.krzywaznia my guess is that the meander macro emits some "bad" JS code referencing jvm stuff. usually something like java.lang.Exception or so

thheller13:02:52

oftentimes you never really run into these exception so the code appears to work. doesn't make it any more valid though.

huxley13:02:53

I will pass the information to the meander creator

thheller13:02:37

yeah as expected the compiled code contains

} catch (e48925) {
                    if (e48925 instanceof java.lang.Exception) {
                      var e__47256__auto__ = e48925;

thheller13:02:58

should it ever end up in that catch the code will break

bringe23:02:48

Hello. Been looking around for clues to this issue I'm having and it looks similar to this issue, but not sure it's the same. I'm trying to require js files compiled from typescript. I can require them with js/require , but trying to require them from the ns form doesn't work. The shadow compilation works, but with a require like ["/config.js" :as config] and then eval config I get

; Execution error (ReferenceError) at (:1).
module$config is not defined

bringe23:02:29

This is with shadow version 12.11.18

thheller23:02:54

don't do this. I thought we went over this in the ticket 🙂

thheller23:02:11

just use js/require instead