From 6b7587edb12b21fb46f15aac955e1e673ea60109 Mon Sep 17 00:00:00 2001 From: Pieter Joost van de Sande Date: Sat, 7 Nov 2020 06:03:39 +0100 Subject: [PATCH] reflex: add page (#4884) --- pages/common/reflex.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/reflex.md diff --git a/pages/common/reflex.md b/pages/common/reflex.md new file mode 100644 index 000000000..6f0152090 --- /dev/null +++ b/pages/common/reflex.md @@ -0,0 +1,24 @@ +# reflex + +> Tool to watch a directory and rerun a command when certain files change. +> More information: . + +- 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 {}`