1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 01:02:09 +02:00

reflex: add page (#4884)

This commit is contained in:
Pieter Joost van de Sande 2020-11-07 06:03:39 +01:00 committed by GitHub
parent 02fddafbf6
commit 6b7587edb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

24
pages/common/reflex.md Normal file
View file

@ -0,0 +1,24 @@
# reflex
> Tool to watch a directory and rerun a command when certain files change.
> More information: <https://github.com/cespare/reflex>.
- Rebuild with `make` if any file changes:
`reflex make`
- Compile and run Go application if any .go file changes:
`reflex --regex='{{\.go$}}' {{go run .}}`
- Ignore a directory when watching for changes:
`reflex --inverse-regex='{{^dir/}}' {{command}}`
- Run command when reflex starts and restarts on file changes:
`reflex --start-service=true {{command}}`
- Substitute the filename that changed in:
`reflex -- echo {}`