This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (63)
- # asami (29)
- # beginners (23)
- # calva (23)
- # cider (18)
- # clj-kondo (12)
- # clojure (156)
- # clojure-europe (30)
- # clojure-italy (6)
- # clojure-nl (5)
- # clojure-uk (6)
- # clojurescript (14)
- # conjure (26)
- # cursive (8)
- # datalog (143)
- # datascript (1)
- # datomic (6)
- # duct (2)
- # emacs (50)
- # events (4)
- # figwheel-main (6)
- # fulcro (7)
- # graphql (12)
- # jobs (6)
- # malli (1)
- # mid-cities-meetup (2)
- # off-topic (4)
- # pathom (6)
- # portal (7)
- # re-frame (10)
- # reagent (8)
- # reitit (10)
- # releases (1)
- # reveal (18)
- # shadow-cljs (39)
- # sql (4)
- # tools-deps (36)
- # vim (25)
- # xtdb (6)
Hi. Does anyone know of a good leining starting project template that combines lein + jvm web server + shadow-cls client build? (hopefully without too much extra baggage, would like websocket support (so not jetty), but would like client side to not have any deps (like no reagent for example))?
you'll learn a tremendous amount of permanently useful and valuable stuff by piecing this together yourself 🙂
to answer your question directly, i'm not aware of one that does these things specifically. you might try for sente + shadow-cljs ?
Check https://luminusweb.com/. But I woud advice to setup a separate build for shadow-cljs instead of managing deps in leiningen.
oh, I also use cider, so something that supports
cider-jack-in-clj&cljs would be great!
is there a way to force a config reload + rebuild from inside the clj/cljs repls provided by shadow?
are you using a watch? if so, you can touch the shadow-cljs.edn and it will rebuild everything
otherwise there is a
shadow.cljs.devtools.api/watch-compile-all! to force building a running
watch. which however won't reload any config since that should be automatic?
@thheller wrt: slurping source -- I've tried the solution you suggested:
slurp with `(io/resource the-file)` should
it seems though that sometimes when this code is run during initial compilation (e.g. when running
shadow-cljs watch app), it can't find the file.
(defmacro run-tests!  (read-string (str "(do " (rewrite/rewrite-without-non-comment-blocks-cljs (slurp (io/resource ana/*cljs-file*))) ")"))))
looks like you should revise your macro setup.
:refer-macros is sooo outdated https://code.thheller.com/blog/shadow-cljs/2019/10/12/clojurescript-macros.html
I found that the error originated from the same
run-tests! that is run in clj-mode. so it had nothing with cljs-file to do
or to put it in a different way, I needed to use
(io/resource *file*) in the clj macro 🙂 rather than just
wrt quoting, it's on purpose, in order to put the forms from read-string into the place the macro is run
thanks again for the link about macros. didn't know you could
refer to macros like that 🙂