"cljsbuild auto" doesn't watch for macros changes, so one is forced to do "lein cljsbuild clean && lein cljsbuild once" manually, and this is painfully slow.
I think it would be pretty easy to have lein-cljsbuild watch the *.clj files in the clojurescript source directory, and do something like (require '[... :reload-all]) when they are modified.
This would only work for macros in the clojurescript source directory though. I can't think of a general way to watch for changes to macros in other directories (macros could be used from any *.clj file anywhere in the classpath). I wonder if this would be good enough for most uses?
Yeah, it would be great. You can also add a vector of additional pathes to watch in config to solve problems of other uses.
+1, exactly the feature I'm missing :)
As for a general way, how about adding an new configuration key to 'cljsbuild', something like:
:watch ["*.clj" "foo/bar/*.clj"]
Watch Clojure files in auto mode.
Clojure files from any ClojureScript :source-path, or from the
a :crossovers namespace that contains macros, are now watched for
changes. When modified, the project is rebuilt. Closes #92.
For the moment, I'm ignoring the general case of "run a build when any of these listed files changes", but that should be fairly easy to add later.
Thanks for motivating me to do this. I've wanted it for a long time, but have been lazy. :)
Let me know how it works for you. In my basic testing, it seems to work fine. I'm sure there's some edge case I missed, though.