Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] watch #404

Closed
yukulele opened this issue Apr 5, 2023 · 3 comments · Fixed by #413
Closed

[feature request] watch #404

yukulele opened this issue Apr 5, 2023 · 3 comments · Fixed by #413
Labels
enhancement New feature or request

Comments

@yukulele
Copy link

yukulele commented Apr 5, 2023

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...
@hildjj hildjj added the enhancement New feature or request label Apr 5, 2023
@hildjj
Copy link
Contributor

hildjj commented Apr 5, 2023

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.

@yukulele
Copy link
Author

yukulele commented Apr 5, 2023

That would be perfect!

hildjj added a commit to hildjj/peggy that referenced this issue Apr 9, 2023
@hildjj
Copy link
Contributor

hildjj commented Apr 9, 2023

I decided to go ahead and support -T/-t, since it would have been harder to disable them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants