This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-22
Channels
- # announcements (39)
- # architecture (9)
- # aws (2)
- # babashka (17)
- # beginners (73)
- # calva (6)
- # cider (27)
- # clj-kondo (140)
- # cljdoc (67)
- # cljsrn (1)
- # clojure (99)
- # clojure-dev (4)
- # clojure-europe (35)
- # clojure-nl (7)
- # clojure-spec (19)
- # clojure-uk (2)
- # clojurescript (40)
- # community-development (3)
- # cursive (10)
- # datalevin (2)
- # datavis (2)
- # datomic (27)
- # deps-new (5)
- # events (2)
- # fulcro (38)
- # integrant (6)
- # jobs (3)
- # keyboards (1)
- # leiningen (13)
- # lsp (3)
- # malli (10)
- # meander (5)
- # membrane (1)
- # membrane-term (9)
- # missionary (3)
- # off-topic (29)
- # polylith (3)
- # reagent (3)
- # reitit (5)
- # remote-jobs (2)
- # reveal (7)
- # shadow-cljs (20)
- # tools-build (4)
- # tools-deps (8)
- # vim (10)
- # xtdb (3)
Is there a way to retrieve data from somewhere in project.clj
and put in :aliases
? For example, I'd like to configure :figwheel-main
in some profiles and then be able to pass those configs to the figwheel launch command in :aliases
.
I don't get what you want exactly, can you rephrase it? (perhaps without mentioning figwheel)
Sure:
{:profiles {:A {:compiler :config-map}}
:aliases ["with-profiles" "A" "run" "m" "something.main" "-co"
#=(pr-str ***COMPILER***)]}
I'd like to fill ***COMPILER***
with the data from :compiler
as defined in the profile.inside defproject you can use ~
to eval arbitrary expressions, within which you can refer to any prior def/defns
if you don't want pure data but the result of a Lein computation, that sounds like something that plugins/middleware can do
I was afraid of that 🙃
here is an example of a piece of 'inline middleware', no messing with .jars required https://github.com/nedap/formatting-stack/blob/31a17527260899b5a052e7e8fc8c4aaf37609d32/project.clj#L84-L101
the fn receives a project map as an argument from Lein, probably with all profiles merged?
Oh an inline middleware, that's very interesting