Hi
Thanks for sharing biff, I am finding it a very useful especially the 2.0 design
I do have some questions about biff 2 that don't really fit into the issues to mention on github.
1. I think the starter startup needs clj -M:run init before clj -M:run dev doing dev before initleads to a missing file error( config.env?) and needs to be called a second time. I just noticed that you state init here https://clojurians.slack.com/archives/C013Y4VG20J/p1788666459732099 but all your documentation states dev directly.
2. On firefox, Biff 1 reloaded the web page automatically (after the first manual reload) but in biff 2 the web page needs to be reloaded manually every time there is a change in the project source. Is this an issue, a design choice or a tradeoff from switching to datastar?
3. Are the demo projects in the "authenticate" and "datastar" libs meant to be functional or are they artifacts of LLM coding sessions?
Hey, glad you've been liking it.
Are you on the latest version, 2.0.0? I updated the dev task so it runs the init task for you. I just tested running this and it worked for me:
git clone my-project
cd my-project
clj -M:run dev
For page reloading--I think I just forgot about this. I'll think about the best way to do this in biff 2. Some of the relevant structure has changed, e.g. the namespace reloading functionality has been pulled out into biff.tasks. But basically what needs to happen is that after namespaces are reloaded, we need to call (com.biffweb.datastar/refresh ctx)
the demo projects are meant to be functional/part of the documentation. If you notice any problems with those let me know.I made an issue for the page refresh thing: https://github.com/jacobobryant/biff/issues/250
I haven't tested it but I think you could just put this in your main namespace after the (defonce system ...):
(defonce system (atom {}))
;; Refresh the page after files are saved/evaluated
(when (contains? @system :biff.datastar/lock)
((requiring-resolve 'com.biffweb.datastar/refresh) @system))
Not sure if that's the approach I'll end up taking or not.alright, I had to do that and also change {:get demo-page} to {:get #(demo-page %)} in the reitit routes. However I implement it later I'll most likely make it so that {:get demo-page} is fine, but for now that's a workaround at least.
Ok the clj -M:run dev is probably just a problem on my pc, I think it has to do with the fact that on my machine`clj` is an alias and clojure is the debian executable binary and not the official clojure one
I will experiment with the demos and put any issues and PR's on github. Thanks