[feature request] watch
yukulele opened this issue · comments
Clément P commented
is it possible to add a --watch
/ -w
option allowing automatic recompiling each time the source file is modified?
usage example:
> peg my-language.peg --watch
compile my-language.peg → my-language.js
waiting for change...
Joe Hildebrand commented
Yes, with the caveat that I'll only use the node built-ins for file watching (not one of the more performant wrapper packages), you'll only be able to watch one file at a time, it won't support testing with -t/-T
. I think it will print a message on success or failure, but not exit until you hit control-C.
Clément P commented
That would be perfect!
Joe Hildebrand commented
I decided to go ahead and support -T/-t, since it would have been harder to disable them.