Wednesday, April 22, 2015

Reflex - trigger an execution of command on a file change event

How many times you were working on some tiny project that needs to be rebuild / restarted after you modify the code? I guess often.

After experimenting with some solutions I found an ultimate one: https://github.com/cespare/reflex
Installation:
go get github.com/cespare/reflex
Automatically recompiling markdown file into html every time the file is changed:
reflex -r '\.md$' blackfriday-tool -page article.md article.html
Or you can restart Go app when saved files:
reflex -r '\.go$' -- go run main.go

No comments:

Post a Comment