I have been using Clojure, ClojureScript, lein, shadow-cljs, Emacs, and CIDER to work on a Clojure/ClojureScript dynamic web app project.
There is the main repository, let's call it principal. And also a supporting repository, let's call it supporting.
Ok. On my local ~/projects folder, I have ~/projects/principal/ and also ~/projects/supporting.
As the names suggest, supporting is a dependency of principal.
Currently, the workflow to work on both repositories is extremely painful. I would like to know if there is a better way.
This is the current workflow:
1 - Build the project on principal with: cider-jack-in-cljs, I choose shadow-cljs, then shadow for REPL type, and app for build option.
2 - If principal needs a tweak on the interfaces of supporting, it is not possible to edit supporting directly and watch the changes live.
3 - Thus, I copy the function to be tweaked on supporting and paste it on principal. Then, I tweak namespaces and some names. I do the tweak and adjust the invocation. More importantly, I am able to watch the changes on the live app being displayed on localhost.
4 - Everything seems to work fine after some tests.
5 - Now, it is time to edit things on supporting repository. This time, with the proper namespaces and names. Also, it is time to remove the temporary duplicate on main
6 - It is not possible to watch the changes on supporting without re-building the whole thing on principal after doing a new lein install on supporting.
7 - After a lein install on supporting, quitting watch app and re-doing the entire build of principal, I can see the app live and check if everything is fine.
Is there a better way to achieve the same result?