Watching multiple directories with devtools `:watch-dir`
I have SCSS files that are compiled to CSS and saved in the target/scssbuild directory. How do I make devtools watch this directory and hot-reload it too?
My shadow-cljs.edn so far is:
:devtools {:watch-dir "resources/public"
...}
resources/public contains files that are being tracked by git, and I would like to keep auto-generated files out of it.
How is target/scssbuild accessible via web? :watch-dir only allows one option since it assumes there is only one http root. It doesn't need to watch anything else since it is only loading files from that http root?
I generally have my public dir in git as well, then just exclude public/js and public/css, so where all the generated files go.
target/scssbuild is a resource directory with a public directory inside, similar to target/cljsbuild:
:resource-paths ["resources" "target/cljsbuild" "target/scssbuild"]
It works, except that the browser has to be manually reloaded each time SCSS files are modified.
Only solution I can offer for now is outputting to resources/public/css and gitignoring that. Saves a bunch of config as well.