File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 66(defn- resource-path
77 " Returns the path of a resource.
88
9- If the resource name starts with a './', the path is built using
10- the parent directory of the namespace from which this macro is invoked ."
9+ If ` resource- name` starts with a './', the path is built
10+ using the parent directory of ` namespace-obj` ."
1111 [namespace-obj resource-name]
1212 (if (str/starts-with? resource-name " ./" )
1313 (let [namespace-str (name (ns-name namespace-obj))
3434 resource-content (slurp resource)]
3535 (apply f resource-content args))))
3636
37- #_(inline-resource* *ns* " ./test-resource.txt" identity )
37+ #_(inline-resource* *ns* " ./test-resource.txt" )
3838#_(inline-resource* *ns* " ./test-resource.txt" str/upper-case)
3939
4040#?(:clj
4141 (defmacro inline-resource
42- " Inlines the content of a resource at 'macro expansion' time."
42+ " Inlines the content of a resource at \" macro expansion\" time,
43+ optionally transformed by `f & args` in the same way that using `clojure.core/update`."
4344 ([resource-name]
4445 (inline-resource* *ns* (eval resource-name)))
4546 ([resource-name f & args]
You can’t perform that action at this time.
0 commit comments