Skip to content

Instantly share code, notes, and snippets.

@zerobias
Last active August 12, 2018 20:18
Show Gist options
  • Save zerobias/9a8f8d79cd67dcecbf8db368342fc282 to your computer and use it in GitHub Desktop.
Save zerobias/9a8f8d79cd67dcecbf8db368342fc282 to your computer and use it in GitHub Desktop.
Flow lazy (aka "blazing fast") server with force recheck shortcuts

Flow lazy (aka "blazing fast") server with force recheck shortcuts

Usage

Run ./flowtype to start server in lazy mode and ./check Foo to add ./src/Foo.js to flow watchlist

One line install

echo '#!/usr/bin/env bash\nnpx flow server --lazy-mode fs --strip-root\n' > ./flowtype && echo '#!/usr/bin/env bash\necho "focus check src/$1.js"\nnpx flow force-recheck --focus ./src/$1.js\n' > ./check && chmod +x ./flowtype && chmod +x ./check
#!/usr/bin/env bash
echo "focus check src/$1.js"
npx flow force-recheck --focus ./src/$1.js
#!/usr/bin/env bash
npx flow server --lazy-mode fs --strip-root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment