Hi all, is there a way to achieve potemkin/import-vars in cljs?
This and following messages might be useful: https://clojurians.slack.com/archives/C03S1L9DN/p1554317042048700
But as David says, it might be better to avoid import-vars altogether.
Thanks. Sounds like more of a compiler-limitation than a technical principle.
I'm working on a component lib, and it would've been very useful to have a central ns will all widgets.
Any idea how I can reuse doc string if I go with the impl/ approach?
I'd put all the docstrings into the public vars only. Well, at least when those vars are just a way to access other vars.
I'd go with this for now, but would work on a separate build step to generate an api.core file
The approach I used here can be made to work with CLJS I think: https://github.com/xadecimal/expose-api It's just code gen. PR welcome to make it work with ClojureScript.
I made a dumb little wrapper for potemkin which adds basic CLJS functionality, but doesn't try to preserve docstrings or anything: https://gitlab.com/jan_k/doomlist/-/blob/master/src/doomlist/infra/potemkix.cljc