Fork me on GitHub

My first day in boot, I love it so far! I'm going through, which recommends boot-reload, boot-cljs-repl, and boot-http. Are these still the recommended options? They don't seem very active. Is anyone using anything like Figwheel-main with boot?

simple_smile 5

@neil.hansen.31 If you are just starting out with CLJS #shadow-cljs might be a nice tool to get started with as well


Also #figwheel-main is cool, I'm using that a lot. I've never used it with boot though, only with #tools-deps


Shadow-cljs does work with boot, I've been told here before


Thanks @borkdude, I've been using shadow-cljs for a few months, and it was a great way to get started. I'm trying to write some CLJS integrations for the tools that my team uses (Next.js for static sites, StorybookJS for a component library), and I'm having a hard time getting a ClojureScript configuration. I was wondering if boot (or tools-deps) might provide me with a little more control over the CLJS output.


I personally prefer using cljs.main for maximum control. If you have issues they are going to ask you to repro with that anyway


figwheel main is really close to cljs.main anyway. this is the config I'm using for a big app I'm working on right now:

:cljs/dev {:extra-deps
                      {com.bhauman/figwheel-main {:mvn/version "0.2.11"}
                       devcards {:mvn/version "0.2.6"
                                 :exclusions [sablono cljs-react-reload]}
                       org.clojars.borkdude/cljs-react-reload {:mvn/version "0.1.2-SNAPSHOT"}
                       sablono {:mvn/version "0.8.6"}
                       re-frisk {:mvn/version ""}}
                      :extra-paths ["src-cljs-dev" "frontend"]
                      :main-opts ["-m" "figwheel.main" "-co" "docsearch.cljs.edn"
                                  "-d" "frontend/public/js/app.out"
                                  "-o frontend/public/js/app.js"
                                  "-c" ""
           :cljs/prod {:extra-paths ["src-cljs-prod"]
                       :main-opts ["-m" "cljs.main" "-co" "docsearch.cljs.edn:docsearch-prod.cljs.edn"
                                   "-O" "advanced"
                                   "-o frontend/public/js/app.js"
                                   "-d" "frontend/public/js/app.out" "-c" ""]}


Thanks for the tip. Do you think what I'm looking for is possible? For example, Next.js requires a .js file (containing module.exports=my_render_func) in a specific pages folder for each html page that it generates. Think that's doable with boot/cljs.main?


Thanks for posting the config.


yeah, you'd have to use optimizations advanced (or simple) to get a single file and use ^:export on the function you'd like to expose


then that function will be in in the JS if is the surrounding namespace


Is that effectively a "default" export? I think that's what Next.js is looking for.


oh gosh, I don't know about that, you'd have to ask in #clojurescript


Will do. I'll read up on cljs.main now. Are you kicking it off with the clj tool?


Thanks so much for your help.


we are using cljs.main for the front-end now, it used to be all boot for front and back, our backend is still using boot, but probably we'll migrate everything over eventually to clj


not that we didn't like boot (it's amazing), but there were certain issues on Java 11 that we never got fixed with the current cljs tools


I've loved what I've seen of boot. It seems like clj is becoming standard, but it doesn't seem as intuitive.

👍 2