This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-30
Channels
- # announcements (8)
- # babashka (73)
- # beginners (126)
- # calva (8)
- # cider (5)
- # circleci (2)
- # clara (9)
- # clj-kondo (4)
- # cljdoc (18)
- # cljfx (49)
- # clojure (51)
- # clojure-australia (3)
- # clojure-europe (41)
- # clojure-france (1)
- # clojure-nl (5)
- # clojure-norway (1)
- # clojure-russia (1)
- # clojure-uk (16)
- # clojurescript (14)
- # conjure (4)
- # cursive (5)
- # data-science (7)
- # datascript (1)
- # datavis (1)
- # datomic (13)
- # defnpodcast (2)
- # emacs (4)
- # events (2)
- # figwheel-main (7)
- # graalvm (23)
- # hoplon (2)
- # jobs (1)
- # meander (15)
- # numerical-computing (1)
- # off-topic (35)
- # pedestal (5)
- # portkey (5)
- # re-frame (19)
- # reagent (9)
- # reitit (14)
- # releases (1)
- # shadow-cljs (28)
- # sql (4)
- # tools-deps (5)
- # xtdb (7)
I'd like to run some clojure code, from within the src code dir of a project, where I can get to the contents of :external-config
(or some place to store a configurable var) in that clojure ns, and then shell out to cli commands that depend on the configuration vars. Do I have to handle launching the figwheel/cljs compiler manually in order to get at the env on the clojure side? Or can I get to it by requiring some things? I basically just need to be able to get some project-wide conf data from both clojure and clojurescript
The way I would think you have to do it is to start figwheel manually. I don't know of any pre-run hooks available to help. I'd try something like this:
(ns my-ns (:require [figwheel.main]))
(defn -main
[]
(setup-your-stuff)
(figwheel.main/start :dev))
And then start with clj -m my-ns
Makes sense. Thanks @UDVJE9RE3!
Hell yeah. I'm glad it worked because I did not try it myself lol