flupot
flupot copied to clipboard
Server-side code generation
I've been thinking about switching to flupot for rendering components - it seems like pre-compilation step should be more efficient than in sablono - but I need server-side rendering. This means that code generated for ClojureScript and Clojure should be different (regular hiccup-like thing for Clojure should do the trick).
I wonder if you've ever thought about that. I'm willing to submit a pull request if you're okay with that. :)
That might be quite difficult to do transparently. Flupot makes heavy use of macros, because in ClojureScript a symbol can be both a macro and function depending on context, whereas in Clojure it can't.
Right, but using (:ns &env) trick you can see if your macro is being compiled for ClojureScript (in this case it's not nil).