     return  unless event is 'deleted'
     # replacing app folder with build
     path = path.replace '/app/', '/build/'
+    # deleting the file from build directory
     del [path], ->
 
 


gulp.task 'coffeeify', ->

  bundledStream = browserify.bundle()
    entries    : "#{paths.appScripts}/game.coffee"
    debug      : on
    transform  : ['coffeeify']
    extensions : ['.coffee']

  bundledStream
    .pipe source "#{paths.appScripts}/game.coffee"
    .pipe buffer()
    .pipe plugins.rename 'game.js'

      baseDir: paths.buildDir


gulp.task 'build', ['copyPhaserFiles', 'coffeeify', 'copyHtml', 'copyStyles', 'copyAssets', 'watchChanges'], ->

  gulp
    .src "#{paths.buildDir}/**/*"
    .pipe plugins.size
      title : 'build'
      gzip  : off
    .pipe plugins.size
      title : 'build'
      gzip  : on


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