-
-
Save ianliu/63f96554f721c3b4b88f8bc96c78aa7c to your computer and use it in GitHub Desktop.
Yarn parallel runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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