Skip to content

Instantly share code, notes, and snippets.

@absurd
Created July 9, 2018 01:34
Show Gist options
  • Save absurd/5f8206cab6da6e0688ec36db09e55112 to your computer and use it in GitHub Desktop.
Save absurd/5f8206cab6da6e0688ec36db09e55112 to your computer and use it in GitHub Desktop.
yarn start (for create-react-app) with voice notifications
#!/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