babashka / neil

A CLI to add common aliases and features to deps.edn-based projects
MIT License
377 stars 27 forks source link

Add `bb dev` task to auto-build `neil` script #82

Closed rads closed 2 years ago

rads commented 2 years ago

I've been using the following command for neil development to re-run the bb gen-script task when a file changes:

find . -iname '*.clj' -o -iname 'prelude' | entr -s 'bb gen-script && date'

Would it be helpful to add a bb watch-script task so this is built-in to the neil repo? It would be nice to not have to use entr for this.

If so, I'm assuming pod-babashka-fswatcher would be preferred over pod-babashka-filewatcher for implementation since it has more recent updates. Edit: Actually I see now that fswatcher does not have a brew formula yet, so I'm not so sure.

borkdude commented 2 years ago

Yes, we can do a bb dev task I think which does that.

rads commented 2 years ago

Great! I was just reading through the docs on fswatcher and I found the :pods example for babashka >=0.8.0:

:pods {org.babashka/fswatcher {:version "0.0.3"}}

Is that what you would recommend to implement this?

borkdude commented 2 years ago

Yeah, I think that works.

rads commented 2 years ago

Excellent, thanks!