It was non-trivial to get user.clj to load cljx code, since Clojure loads user.clj long before running the project's prep-tasks
project.clj change commentary:
Rely on cljx's repl-middleware to load cljx files, rather than falling back to "target/classes"
Stopped running "cljx once" all the time. Only use it on install.
Remove generated paths from :source-paths. It's sufficient for this code to sit in target/classes. There were lots of "duplicate file" errors on install, and this was why.
cljx folder is still included in :source-paths because some tools use it for go-to-definition, and because there's a single .clj file in src
Moved :cljx and :cljsbuild spec out of profiles. It's good enough to scope the plugin to the profile.
"lein do check, install" is no longer right. "lein do install, check" or "lein do cljx, check" are valid.
Also, a better fix to the recent cljs :import regression. Import classes via :require in cljs (though Clojure requires :import)
It was non-trivial to get user.clj to load cljx code, since Clojure loads user.clj long before running the project's prep-tasks
project.clj change commentary:
Also, a better fix to the recent cljs :import regression. Import classes via :require in cljs (though Clojure requires :import)