So, I took the big Clojure project and split it into two.
I put together the bulk and made Uberjar.
Then printed:
lein deploy clojars
to make this jar public, and then added it as a dependency in the project.clj file for my application.
This code is written in cljx, so it can compile in javascript.
What equivalent steps do I need to make my two cljx code sections be in two separate javascript libraries without repeating the whole ClojureScript virtual machine twice?
Update: just to clarify a couple of things.
1) I know that I can go to .cljc and not to .cljx. My only problem is that this seems pretty new, and I don't know if existing users of my code can have it. But I will most likely take this step soon. Answers in terms of cljc are also welcome.
2) I am already successfully compiling my code into one monolithic main.js. I am looking for how to compile individual cljs libraries that can be included in other cljs projects. Since every time I am currently compiling something in cljs, I get the main.js file with the entire clojurescript virtual machine.
3). One of my motives for returning to this question is that I want to start using Figwheel. So I want to be able to create libraries in clojurescript so that I can move on to the new clojurescript project that I am developing through Figwheel. Therefore, I assume that I will link to them in this new project project.clj file and include them in the web page as already compiled .js files. Am I wrong about this?
source share