As I understand most clojure and java libraries can be included in cljs code. How does the cljs compiler accomplish this ?
I understand that if I have a source file, the cljs compiler takes the source and outputs javascript. However how about if I am using java libraries such as joda-time for which I have included its clojure wrapper clj-time. So in this case it only has the java byte code for joda-time. So how will the cljs build tool, generate js code from the byte code of the java jar (joda-time)?
As I understand most clojure and java libraries can be included in cljs code. How does the cljs compiler accomplish this ?
You are mistaken. Many clojure libraries can be compiled for CLJS, with only minimal changes (sometimes even none), but there is no way to use classfiles: it must be .clj source files, compiled to javascript instead of to classfiles.
You cannot use Java libraries in cljs code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With