Fork me on GitHub
#shadow-cljs
<
2022-04-24
>
p-himik10:04:52

What would be the right way to get a build config that has either :dev or :release value merged into it correctly? It's needed to make things use proper shadow-cljs values when using clj-run. Currently, I have this abomination:

(defn- get-config [build-id mode]
  (let [init (shadow.build.api/init)
        build-config (shadow/get-build-config build-id)
        build-state (shadow.build/configure init mode build-config)]
    (:shadow.build/config build-state)))

thheller10:04:16

what do you intend to do with that though?

p-himik10:04:58

Two things: • Let sass know where to put the resulting CSS files (I'm really averse to hard-coding the values everywhere but the config) • Automatically open a browser tab with the URL that matches a :dev-http entry for a specific build