Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run flow check continuously (flowtype)

I was wondering if someone knew of a good way to continuously run the "flow check" command inside a given repo such that it will re-run anytime a file is updated?

Thanks! Thomas

like image 802
tnrich Avatar asked Mar 03 '16 08:03

tnrich


1 Answers

fswatch -o ./ | xargs -n1 -I{} sh -c 'clear; printf "\033[3J" && flow' using https://github.com/emcrisostomo/fswatch will get you a nice color-coded experience that is cleared properly every time

and if you wanna put it in your NPM scripts, here's the escaped version:

"flow-watch": "fswatch -o ./ | xargs -n1 -I{} sh -c 'clear; printf \"\\033[3J\" && flow'"

like image 66
faceyspacey.com Avatar answered Sep 23 '22 01:09

faceyspacey.com