This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-21
Channels
- # admin-announcements (1)
- # announcements (6)
- # babashka (8)
- # beginners (134)
- # calva (18)
- # chlorine-clover (1)
- # cider (6)
- # circleci (6)
- # clj-commons (111)
- # cljsrn (13)
- # clojure (95)
- # clojure-australia (2)
- # clojure-europe (15)
- # clojure-nl (1)
- # clojure-spec (52)
- # clojure-uk (17)
- # clojurescript (4)
- # datavis (9)
- # datomic (8)
- # docker (2)
- # emacs (15)
- # events (7)
- # fulcro (6)
- # graphql (1)
- # gratitude (1)
- # introduce-yourself (2)
- # kaocha (8)
- # meander (87)
- # minecraft (2)
- # music (2)
- # off-topic (20)
- # portal (119)
- # releases (1)
- # reveal (55)
- # shadow-cljs (34)
- # sql (36)
- # tools-deps (9)
- # vim (8)
- # xtdb (39)
Newbie question. I want to do some interactive development so I'm running shadow-cljs watch server app
but I think I want to turn off hot reloading because I'm setting local vars to aid debugging and they are lost when the namespace reloads.
(I'm using comments in the namespace to prepare sexprs to send to the repl)
I can see that I could add metadata to the namespace to say "hands off" but is there a way to tell the file watcher to stop watching.
I tried shadow-cljs compile server app
but it wasn't happy.
put the local vars in a defonce atom
Can you stop the watcher?
you don't need to if you put the vars in a defonce
in a atom
That's not particuarly convienient for what I'm doing
like (defonce my-locals (atom { })
e.g. set db var then execute part of an existing fn which exects a local var
I see it would work as a workaround though. Thanks.
im not sure why it's a work around
that IS the way as far as I understand
so that you can keep the repl alive
Okay, thanks. I'll give that a try. (also ^:dev/once will get me where I want to go)
Just curious for the repl command. There was one for figwheel called stop-autobuild
.
yes, but why would you want to turn it off? thats basically clojure killer feature
isolate your state to a an atom
Okay, thanks.
np, I'm new to clojure too
just created a simple textfile parser, no state 😄
wonderful stuff
off to bed!
wait till you play with instaparse... you'll feel like a god!
@olivergeorge there is (shadow.cljs.devtools.api/watch-set-autobuild! :the-build-id false)
to stop the automatic rebuild or you can set :devtools {:autoload false}
in your build config to still run the automatic watch rebuild but not automatically load it
you can also start the watch from the CLJ REPL with (shadow.cljs.devtools.api/watch :the-build-id {:autobuild false})
Hi @thheller, I remember a discussion about a Shadow-cljs build-hook for parse/write in index.html I think. Can you refresh my memory about the name please?
Great, thanks!
Is there anything special you need to do to get shadow-cljs to work with a https://stackoverflow.com/questions/14381898/local-dependency-in-package-json/14387210#14387210? I've checked the project directory after installing the local package, and it created a symlink under npm_modules to the local module on my disk.
But when I try to require the file, it says the required JS dependency is not available .