This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-20
Channels
- # announcements (1)
- # beginners (17)
- # calva (16)
- # cljfx (5)
- # clojure (94)
- # clojure-europe (1)
- # clojure-italy (2)
- # clojure-spec (4)
- # clojure-uk (1)
- # core-async (12)
- # datahike (3)
- # datomic (6)
- # depstar (4)
- # fulcro (30)
- # introduce-yourself (2)
- # malli (1)
- # off-topic (10)
- # re-frame (71)
- # shadow-cljs (15)
- # tools-deps (3)
- # xtdb (12)
Ok, so I’m trying to wrap my head around how aliases and builds work within shadow-cljs.
When I run the command shadow-cljs watch [buildname]
I spin up a repl and everything, but it also seems to load the dependencies I specify.
It seems like it’s no different that if I ran shadow-cljs -A:test:dev watch test
.
{...
:aliases {:dev {:extra-deps {thheller/shadow-cljs {:mvn/version "2.14.5"}
refactor-nrepl/refactor-nrepl {:mvn/version "2.5.1"}}}
:test {:extra-paths ["test"]}}}
I have two aliases.
In shadow-cljs.edn
I’m referring to two aliases.
Does this mean I have the option of using these aliases before running shadow?
Or does it load all aliases regardless? I usually spin up a node-repl as opposed to loading a build.
{:deps {:aliases [:dev :test]}...
:builds {:script ...
:test ...}}
My expectation was that within each build I could have it point to an alias in deps.edn
but there’s no documentation to suggest that’s possible, neither have I found any examples on github.or configure those aliases. the alias are always loaded yes, it is not supported to specify aliases per build
but if you can clj -A:test -M -m shadow.cljs.devtools.cli compile test
or whatever if you must have an alias per build
but .. having extra unused dependencies on your classpath does NOT affect your build in any way
they don't. only namespaces you actually :require
are compiled. so having test
on the classpath always doesn't matter since you never require your tests in your regular buidl anyways
https://code.thheller.com/blog/shadow-cljs/2018/02/08/problem-solved-source-paths.html
so really all this deps.edn alias tinkering isn't required for shadow. you can do it if you really want to but you don't have to
The reloading process (e.g ^:dev/after-load) seems to happen such that my browser defaults (e.g css grid overlay div selected) always get reset. I would like them not to get reset. I'm trying to understand why they are. Currently my mental model is that the page is refreshing. Edit. It's not refreshing, i meant re-rendering, which yes, i'm telling it to do. I dont think i can get that gird selection to stay.