Fork me on GitHub
#clojurescript
<
2023-09-29
>
anovick07:09:10

Should I think of shadow-cljs as a one-stop shop tool for building CLJS-based web apps? Is shadow-cljs symbiotic with npm so as to make it easy to both use packages released there, but also publish packages to there (the JS bundle that is)?

thheller07:09:00

it doesn't handle publishing at all, you use npm for that. but yes, the compiled output can be published to npm. the JS code that is, CLJS libs are published to clojars usually

thheller07:09:31

and yes, shadow-cljs does all you need to build CLJS based things

anovick07:09:17

@U05224H0W You're wicked fast 🙂 I loved that

anovick07:09:37

Also related, just out of curiosity, isn't clojars supposed to be just for JARs?

anovick07:09:48

(or are we just looking at JAR as a file format here, i.e. as a compressed file formart e.g. zip)

thheller07:09:26

yes, jar is basically just a zip file containing all the files you want published

anovick07:09:49

Aha I see. Any way to search in clojars specifically for CLJS/shadow-cljs packages?

thheller07:09:09

there are no shadow-cljs packages on clojars, there are all generic CLJS packages

thheller07:09:32

I don't know if there is a way to specifically search for CLJS though

anovick07:09:03

So is it the case that currently the CLJS is just mixed together with CLJ packages with no metadata to distinguish between them?

anovick07:09:01

If I were using CLJ on the JVM and I found a package on clojars that seemed to do what I liked, but it had no mention of CLJS that would be inconvenient (and vice versa if I were using CLJS in JS environments)

thheller07:09:47

most libs specify when they are cross platform

thheller07:09:00

but yes there are many CLJ only libs, as they are many CLJS only libs

anovick07:09:02

Thanks so much 🙂 have a great day

phill10:09:52

While a filter in Clojars would be nice, as a practical matter it's pretty easy to tell whether an attempt was made at clj/cljs interoperability in a particular candidate library: follow Clojars' link to Github and take a quick look in the code repository for ".cljs" or, especially, ".cljc" files among the source files.

âž• 1