Skip to content

Instantly share code, notes, and snippets.

@ianliu
Created April 9, 2019 17:36
Show Gist options
  • Save ianliu/63f96554f721c3b4b88f8bc96c78aa7c to your computer and use it in GitHub Desktop.
Save ianliu/63f96554f721c3b4b88f8bc96c78aa7c to your computer and use it in GitHub Desktop.
Yarn parallel runner
#!/bin/bash
color=31
for name in "$@"; do
yarn run "$name" | while IFS= read -r line; do
printf "\033[%dm$name:\033[0m %s\n" $color "$line"
done &
(( color++ ))
done
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment