Created
January 30, 2018 13:03
-
-
Save olieidel/27d05f646f42bf14a614bbd837f8410b to your computer and use it in GitHub Desktop.
ClojureScript: read out leiningen project version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns your-project.constants | |
#?(:cljs (:require-macros [your-project.constants :refer [get-app-version]]))) | |
#?(:clj | |
(do | |
(def app-version | |
(System/getProperty "your-project.version")) | |
(defmacro get-app-version [] | |
app-version)) | |
:cljs | |
(def ^:const app-version (get-app-version))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment