2020-11-07 05:03:39 +00:00
|
|
|
# reflex
|
|
|
|
|
2024-02-14 20:25:13 +00:00
|
|
|
> Watch a directory and rerun a command when certain files change.
|
2020-11-07 05:03:39 +00:00
|
|
|
> More information: <https://github.com/cespare/reflex>.
|
|
|
|
|
|
|
|
- Rebuild with `make` if any file changes:
|
|
|
|
|
|
|
|
`reflex make`
|
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- Compile and run Go application if any `.go` file changes:
|
2020-11-07 05:03:39 +00:00
|
|
|
|
|
|
|
`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 {}`
|