sihl icon indicating copy to clipboard operation
sihl copied to clipboard

inotifywait

Open idkjs opened this issue 3 years ago • 4 comments

Is there a version of this setup that can run without inotifywait which I believe is linux only?

I am on a mac and would like to run it without docker if that is possible.

Thanks.

idkjs avatar Jul 18 '21 09:07 idkjs

The only dependency on inotifywait should be in the Makefile for the make dev command.

inotifywait -e modify -e move -e create -e delete -e attrib -r pwd --exclude "(_build|logs|Makefile|.git|node_modules)" -qq

Maybe this could be replaced or supplemented with something like fswatch? @aronerben What do you think?

joseferben avatar Jul 20 '21 15:07 joseferben

Maybe this could be replaced or supplemented with something like fswatch? @aronerben What do you think?

Sounds good, from what I'm gathering, fswatch is cross-platform, so we might as well replace inotify entirely with it.

aronerben avatar Jul 20 '21 15:07 aronerben

Stuff I came across tyring to figure it out. https://github.com/mirage/irmin-watcher handles fsevents https://makeplus.net/ -> could listen to the events you want to listen to and run whatever command.

idkjs avatar Jul 20 '21 16:07 idkjs

Thanks for the hints, we can dig into it a little more. It is generally on the roadmap to add a more clever "hot-reloading" with incremental builds (I think that is the goal of https://github.com/oxidizing/sihl/issues/385, correct @jerben?). That would make this "external" file watching business obsolete...

aronerben avatar Jul 20 '21 18:07 aronerben