 outapp = './Yakayak.app/Contents/Resources/app'
 outui  = outapp + '/ui'
 
-gulp.task 'clean', (cb) ->
-  rimraf outbin, cb
-
 copyPrebuilt = ->
   # XXX this stinks, but gulp can't deal with
   # the symlinks in the binary.

    .pipe gulp.dest outapp


gulp.task 'watch', ['default'], ->

  # create an auto reload server instance
  reloader = autoReload()


  reloader.script()
    .pipe gulp.dest outui

  # watch rebuilt stuff
  gulp.watch "#{outui}/**/*", reloader.onChange


gulp.task 'clean', (cb) ->
  rimraf outbin, cb

gulp.task 'default', ['package', 'coffee', 'html', 'less']

gulp.task 'watch', ['reloader', 'default'], ->
  # watch to rebuild
  sources = (v for k, v of paths)
  gulp.watch sources, ['default']
