Search code examples
clojurescriptfigwheel

How to quickly re-load the new code for a ClojureScript library I'm developing?


I have a project using Figwheel with ClojureScript and I'm developing a ClojureScript library. My cycle involves modifying the library, installing with lein install and then using it from the app.

The last part is the one I'm not sure about. Nothing short of lein clean in the app seems to get rid of the previous copy of the library. Having to do a lein clean and recompile every time I modify the library is very cumbersome.

Is there a better way?


Solution

  • you could probably add your lib source path to your cljsbuild source path in project.clj

    :cljsbuild {:builds [{:id "dev"
                          :source-paths ["src" "/my/awesome/lib/src"]}
                          ...}]}
    

    so you can simply refer needed namespaces, and figwheel will recompile all the changes both in a lib and in your app. I guess this should work.