What's a good development process for a ClojureScript web application library?

clojurescript

#1

Working with Clerk, which is a small CLJS library for web applications, I am struggling with how to close the feedback loop better.

Currently I have to do ”lean install” and then restart a test project, using Clerk, to see what a change will do.

There must be a better way! I’d like to be able to require the development version from my test project and have Figwheel reload changes to Clerk. Can that be achieved? If so, how? If not, what is the closest I can get?


#2

You could just create an example setup in the clerk repo itself that you use for testing (my preferred method). Or use lein “checkouts” feature to directly include the sources of the lib in your test project, thats saves the lein install.


#3

Shadow-cljs will do all the magic for you as long as you have a web page connected.
It’s pretty sweet.


#4

Yeah, that works great!

Only thing is that I need to add a dependency that Clerk has (core.async in this case) to the test project, where it does not belong. Anyone knows if there is a way to make the test project consume Clerk’s project.clj?


#5

I LOVE shadow-cljs! Might bring it in if I decide to try make a Node library from Clerk.