Fork me on GitHub
#clojurescript
<
2017-10-14
>
mtbkapp00:10:28

I was listening to Antonio Monteiro talk at the Clojure Conj and seeing all the great things that have been added to ClojureScript. I was also thinking about how some people were able to get JVM Clojure into their work place by putting a little Clojure in their Java apps because Clojure was just a jar. I was wondering how I could do the same with a mostly Javascript app. I see a lot of things for putting Javascript into a ClojureScript app but not the other way around. Has anyone had any success doing that? I see that Datascript is available as a npm module.

dominicm07:10:42

@mtbkapp This is something @thheller is working on with https://github.com/thheller/shadow-cljs in particular: https://github.com/thheller/shadow-cljs/wiki/ClojureScript-for-node.js-libraries is probably of note (Possibly @thheller can link you to something much better)

hmaurer14:10:12

Couldn’t you just compile a cljs project and use it as a library, with the right foreign API?

dominicm16:10:07

@U5ZAJ15P0 You've have to do a lot of ^:export and it would essentially be globals, which isn't the natural way to work in node.js

dhirensr109:10:37

hey, how do you use react libraries in reagent if its package is not available in cljsjs! can anyone help?

Jon09:10:50

as far as I know shadow-cljs bundles react components in npm? not known how reagent handles it..