This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-10
Channels
- # announcements (3)
- # beginners (67)
- # calva (4)
- # cider (3)
- # clj-kondo (58)
- # cljs-dev (4)
- # clojure (172)
- # clojure-berlin (4)
- # clojure-chicago (8)
- # clojure-europe (4)
- # clojure-greece (8)
- # clojure-italy (12)
- # clojure-nl (4)
- # clojure-spec (7)
- # clojure-uk (77)
- # clojurescript (13)
- # clojutre (16)
- # core-async (10)
- # cursive (3)
- # datomic (29)
- # figwheel-main (27)
- # fulcro (22)
- # garden (3)
- # jobs (2)
- # jobs-discuss (13)
- # juxt (5)
- # leiningen (14)
- # mount (4)
- # off-topic (28)
- # pathom (6)
- # pedestal (8)
- # portland-or (2)
- # re-frame (20)
- # remote-jobs (6)
- # shadow-cljs (13)
- # sql (74)
- # testing (17)
- # tools-deps (1)
- # vim (1)
- # xtdb (1)
Hi everyone, do someone knows if there is a way to pass data to a clojurescript project (Reagent) when building from leiningen?
What I would like to do it get the last commit information from the git repo inside the clojurescript project, and pass that information to my project to be able to display it inside the build
The more general question would be if there is a way to trigger some Clojure code when calling a build command like lein package
Maybe there's a more straightforward answer to your questions, but I've used :filespecs
to grab git information and package it during lein uberjar
https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L432
I'm not sure how a clojurescript build differs as filespecs
is specifically for adding things to a jar file.
Mmmmh thanks for the answer, I’ll check it out! 😃
@elkiwydev you can pass things to CLJS via :closure-defines
within a :cljsbuild
in lein project:
:closure-defines {your.project.ns.name.SOME_DEF ~(find-some-dynamic-build-info)}