Shadow-cljs has a resource loader that can include literal files into the Clojurescript code
(ns app.my (:require [shadow.resource :as rc])) (rc/inline "file.txt") I need a macro that includes the literal file, but preprocessed by some function. Let's for the sake of simplicity say that we uppercase the text of the file.
(ns app.my (:require [shadow.resource :as rc])) (clojure.string/upper-case (rc/inline "file.txt")) This code includes the regular text, and then uppercases it at run-time. I need it to be uppercased at macroexpansion, so that the uppercased text is included. Exactly like it would be if the original file was upper case.
I can't really fit this together, with macros expanding outside-in. Please help!