Echo a system bell on all errors to alert the user

Fixes #84

## Problem
Sometimes the user may not know that a wGulp watch or task has failed. 

## Solution
Alert them with a system bell.

## Testing
- Create some error scenario:
    - Missing JSX closing tag
    - Violate jshint or tslint rule
- Listen for the bell on a build

@trentgrover-wf 
@evanweible-wf 

FYI: @patkujawa-wf 
Cool - just thought I'd share my gulp learnings in case something was
missing :)

On Tue, Oct 28, 2014 at 4:15 PM, Max Peterson <notifications@github.com>
wrote:

> In index.js:
>
> > @@ -35,6 +35,11 @@ module.exports = function(gulp, userConfig){
> >          options.isDist = _.contains(e.message.split(','), 'dist');
> >      });
> >
> > +    // Echo a system bell on all errors to alert the user
> > +    gulp.on('err', function(e){
> > +        console.log("\u0007");
>
> So we kind of already manually do this in a lot of our tasks - we return
> the callback with an instance of gutil.PluginError which handles logging
> err nicely as well as calling this.emit('end').
>
> Here is an example in the coffee subtask:
>
>         return function (cb) {
>             // Some things omitted....
>             return stream.pipe(changed(config.dest || defaults.path.buildSrc))
>                 .pipe(coffee({bare: config.bare || true}))
>                 .on('error', function(err){
>                     cb(new gutil.PluginError('coffee', err));
>                 })
>                 .pipe(gulp.dest(config.dest || defaults.path.buildSrc));
>
> So PluginError handles some things for us.
> Perhaps we should re-evaluate this. Maybe we could get away with removing
> these error handlers from each task/subtask and just doing it once in this
> 'global' event handler...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Workiva/wGulp/pull/92/files#r19508107>.
>



-- 
*Pat Kujawa*

*Software Engineer*
*Workiva* *formerly WebFilings*
*Missoula, MT*