The :process-ast option expects a function that transforms the
enlive-style template, right after parsing from HTML. This allows the
programmer to inject arbitrary ClojureScript into the template before
applying transforms and passing it to the emitter functions. The
injection happens at compile time, but the transformation function can
inject clojurescript code that will run at runtime.
One use case for this is embedding a minilanguage into text nodes in the
HTML templates: the transformation function in this case traverses the
template, parsing string nodes and replacing them with suitable
clojurescript function calls.
This is in response to issue #64 (Compile Time Transforms), and should be enough to solve my problem.
The :process-ast option expects a function that transforms the enlive-style template, right after parsing from HTML. This allows the programmer to inject arbitrary ClojureScript into the template before applying transforms and passing it to the emitter functions. The injection happens at compile time, but the transformation function can inject clojurescript code that will run at runtime.
One use case for this is embedding a minilanguage into text nodes in the HTML templates: the transformation function in this case traverses the template, parsing string nodes and replacing them with suitable clojurescript function calls.
This is in response to issue #64 (Compile Time Transforms), and should be enough to solve my problem.