Skip to content

Instantly share code, notes, and snippets.

@colinkahn
Created August 5, 2019 20:16
Show Gist options
  • Save colinkahn/2bbeac1573f923e187301704a7283cd3 to your computer and use it in GitHub Desktop.
Save colinkahn/2bbeac1573f923e187301704a7283cd3 to your computer and use it in GitHub Desktop.
(ns project.core
(:require [project.module :refer [string]]))
(println string)
(ns project.module
#?(:clj
(:require [project.settings :as settings]))
#?(:cljs
(:require-macros [project.module :refer [compiled-string]])))
#?(:clj
(do
(defmacro compiled-string []
`(do ~(pr-str {:foo settings/foo :bar settings/bar :baz settings/baz})))
))
#?(:cljs
(do
(def string (compiled-string))
))
(ns project.settings)
(def foo 1)
(def bar 2)
(def baz 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment