Open luchiniatwork opened 5 years ago
You can skip the read-string and inline the edn itself. You can change init-path to a macro
(defmacro init-path [path & others]
(let [paths (-> others flatten (conj path) flatten)
data (->> paths
schema-files
slurp-files
vec)]
`(apply init-schema (quote ~data))))
This will be particularly useful for plugins such as the Visualizer for now.
The trick might involve something along the lines of a macro somewhat like this:
Combined with ClojureScript's reader, i.e: