Created
July 9, 2018 01:34
-
-
Save absurd/5f8206cab6da6e0688ec36db09e55112 to your computer and use it in GitHub Desktop.
yarn start (for create-react-app) with voice notifications
This file contains 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
#!/usr/bin/env bash | |
unbuffer yarn start | tee >( | |
while read line | |
do | |
if [[ "$line" = *"Starting the development server"* ]] | |
then | |
echo "Starting the development server" | say -v Vicki -r 250 | |
elif [[ $line = *"Compiled"* ]] | |
then | |
echo "Compiled" | say -v Vicki -r 250 | |
elif [[ $line = *"Compiling"* ]] | |
then | |
echo "Compiling" | say -v Vicki -r 250 | |
elif [[ $line = *"Failed to compile"* ]] | |
then | |
echo "Failed to compile." | say -v Vicki -r 250 | |
else | |
echo "" | |
fi | |
done) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment