 gulp.task 'build-test-dev', ->
   gulp.src './test/*'
     .pipe sourcemaps.init()
-    .pipe coffee().on 'error', onError
-    .pipe espower().on 'error', onError
+    .pipe ignoreError coffee()
+    .pipe ignoreError espower()
     .pipe sourcemaps.write()
     .pipe gulp.dest './.tmp/'
 

mocha = require 'gulp-mocha'
sourcemaps = require 'gulp-sourcemaps'

onError = (e) ->
  gutil.log e
  @emit 'end'

gulp.task 'build', ->
  gulp.src './src/*'


gulp.task 'test-dev', ['build-dev', 'build-test-dev'], ->
  gulp.src './.tmp/*'
    .pipe ignoreError mocha()

gulp.task 'watch', ['build-dev'], ->
  gulp.watch ['./src/*', './test/*'], ['test-dev']
