this react native thing is difficult to set up
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.that is a deps.edn question. not really a shadow-cljs question.
I mean you can just use deps.edn directly if you want
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
so just always load all of them
Ok, I thought they would affect build size.
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
Ok, good to know.
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
You really do have some good build tools.
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.