Hacker News new | ask | show | jobs
by polyrand 1308 days ago
I do something similar using entr [0][1]. I use it instead of `watch` because I would rather not re-run things if no relevant files have changed.

For example, I run:

  fd -e j2 -e py | entr -c python3 build.py
To rebuild a static site every time the build script[2] (py) or a Jinja2 template (j2) changes.

[0]: https://github.com/eradman/entr

[1]: https://jvns.ca/blog/2020/06/28/entr/

[2]: https://gist.github.com/polyrand/3bed83897658806bd490e1d44df...