I recently watched Bret Victor's video - Inventing on Principle. That is so inspired. The demos are awesome in their own right. He talked about his principle: Creators need an immediate connection to what they create.
Inspired by that, I start thinking about how to speed up my development feedback. Here is a little trick that I think is useful to me.
Introduce two core tools
ag: The Silver Searcher. Like ack, but faster.
entr: Run arbitrary commands when files change.
Save code, See the result
Web sample
When any html/css/js files change, the current chrome page will refresh.
ag -l --html --css --js | entr ./reload-browser.sh chrome
You can download reload-browser.sh
from here.
Golang sample
When any go files change, my custom run script will be executed. I can build, start, run tests on my project automatically.
ag -l --go | entr -c -r ./run.sh
Top comments (0)