brew tap f/guardian brew install guardian
$ guardian 💂Guardian is on duty!
.guardian.yml is a simple YAML file.
Simply it has YAML documents with seperated by
--- line and each document has
files key needs a glob pattern, and
run is a shell command what to run.
files: ./**/*.cr run: crystal build ./src/yourapp.cr --- files: ./shard.yml run: crystal deps
%file% variable in commands with the changed file.
files: ./**/*.txt run: echo "%file% is changed"
Think you have a
hello.txt in your directory, and Guardian will run
echo "hello.txt is changed" command when it's changed.