noteflakes-music/lyp

Add watch command

noteflakes opened this issue · 0 comments

The watch command is used for watching files or directories and automatically running lilypond whenever those files change. The watch should accept one or more directories or files to watch.

The watch command should also accept a --target option to signify the file to compile whenever any file changes. This would be useful when the user wishes to watch include files but to only compile a specific file.

$ lyp watch bwv78
17:38:13 Watching bwv78...
17:40:22 bwv78/oboe.ly changed, recompiling
...
17:45:51 bwv78/violino1.ly changed, recompiling
...
^C
# watch multiple directories, recompile specific file
$ lyp watch bwv78 house-style stdlib -t bwv78/score.ly
...