   options =
     cache: {}
     packageCache: {}
-    entries: ['./.tmp/src/index.js']
+    entries: [dirs.tmpSrc + 'index.js']
     debug: true
   b = browserify options
   w = watchify b

  null

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

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

gulp.task 'watch', ['build(dev)'], ->
  watch [
    './src/**/*.coffee'
    './test/**/*.coffee'
  ], ->
    run.apply run, [
      'build:coffee(dev)'

watch = require 'gulp-watch'
watchify = require 'watchify'

dirs =
  dist: './lib/'
  src: './src/'
  test: './test/'
  tmpSrc: './.tmp/src/'
  tmpTest: './.tmp/test/'

ignoreError = (stream) ->
  stream.on 'error', (e) ->
    gutil.log e
