diff --git a/src/main/clj/dda/c4k_common/macros.clj b/src/main/clj/dda/c4k_common/macros.clj new file mode 100644 index 0000000..22133b1 --- /dev/null +++ b/src/main/clj/dda/c4k_common/macros.clj @@ -0,0 +1,8 @@ +(ns dda.c4k-common.macros + (:require [clojure.java.io :as io])) + +(defmacro inline-resources [resource-path] + (let [files (.listFiles (io/file (io/resource resource-path))) + file-contents (map slurp files) + file-names (map #(str resource-path "/" (.getName %)) files)] + (zipmap file-names file-contents)))