Developing on Staxmanade

Build Command with Auditory Feedback

(Comments)

Here's a short and fun little ditty I'm going to throw up here so I can find it later... (because why would I try to memorize something so simple when I can put it here and share with you all?).

My Builds Are Speaking to Me

Running this command from my Mac command line window gives a nice audio feedback when builds are complete.

(gulp && say 'super!') || say "what the what?" -v Albert

Some Context

While doing some project work on my Mac lately I'm in the situation where I am constantly running gulp at the command line. This workflow could apply to any CLI build tool like gulp, rake, make, etc and ya I know I need to spend the time getting gulp watch to work but let's not worry about that for now...

The build is not slow, but it's not fast (taking about 6) seconds. That's just enough time for me to see a squirrel and by the time I realize the build is done, I've forgotten if I actually recently kicked off the build or if the most recent run is out of date from the latest code I've worked on...

So I searched for a quick way to get some auditory feedback when my build was done so I could more efficiently continue the development flow...

I first stumbled upon this gist which has a NodeJS implementation console.log("\007");, but this produces the same beep I get when my unit tests fail - which I don't want when everything's good to go.

Then I found someone mention the mac say command which is WAY better for my needs and I settled on the following little command.

(gulp && say 'super!') || say "what the what?" -v Albert

Whats cool about this pattern is I can replace gulp with any other build tool on other projects like rake, grunt, make, etc...