1

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?

Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622

2 Answers2

1

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.

leetwinski
  • 17,408
  • 2
  • 18
  • 42
0

the other thing you can do is use the figwheel (reset-autobuild) command. This can be useful as it will do an implicit lein clean before re-building your cljs files.

Tim X
  • 4,158
  • 1
  • 20
  • 26