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

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 {}`