This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-24
Channels
- # announcements (6)
- # architecture (9)
- # aws (2)
- # babashka (49)
- # beginners (160)
- # boot (19)
- # calva (9)
- # cider (16)
- # clj-kondo (17)
- # cljfx (9)
- # clojure (143)
- # clojure-australia (5)
- # clojure-berlin (1)
- # clojure-czech (3)
- # clojure-europe (64)
- # clojure-france (1)
- # clojure-italy (12)
- # clojure-nl (4)
- # clojure-spec (6)
- # clojure-uk (47)
- # clojurescript (27)
- # code-reviews (5)
- # conjure (45)
- # cursive (47)
- # datascript (2)
- # datomic (21)
- # events (1)
- # fulcro (9)
- # graalvm (4)
- # graphql (2)
- # jackdaw (22)
- # jobs (3)
- # kaocha (6)
- # london-clojurians (1)
- # luminus (4)
- # malli (19)
- # meander (136)
- # pathom (4)
- # pedestal (2)
- # re-frame (15)
- # reitit (2)
- # remote-jobs (2)
- # rum (12)
- # sci (1)
- # shadow-cljs (100)
- # spacemacs (10)
- # sql (1)
- # tools-deps (30)
- # vrac (1)
- # xtdb (30)
My first day in boot, I love it so far! I'm going through https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-02.md, 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
?
@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
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 "0.5.4.1"}}
: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" ""
"-r"]}
: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?
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 foo.bar.yourfunction in the JS if foo.bar is the surrounding namespace
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