 
 gulp.task 'sprites@1x', ->
 
-  spriteStream = gulp.src 'static/sprites@1x/**/*.png'
+  stream = gulp.src 'static/sprites@1x/**/*.png'
     .pipe spritesmith
       imgName   : 'sprite@1x.png'
       cssName   : 'sprite@1x.styl'

  gulpBrowserify
      entries : ['./app/coffee/main.coffee']
    .pipe source 'main.js'
    .pipe buffer()
    .pipe pistachio()
    .pipe stream()
    # .pipe livereload()
    .pipe gulp.dest "#{BUILD_PATH}/js"

gulp.task 'watch-coffee', -> watchLogger 'cyan', gulp.watch COFFEE_PATH, ['coffee']


      algorithm : 'binary-tree'
      padding   : 5
      cssFormat : 'stylus'
      cssVarMap : nameStylusVars.bind stream, ''

  stream.css
    .pipe gulp.dest './app/styl/'

  stream.img
    .pipe gulp.dest "#{BUILD_PATH}/images/"

  return stream


gulp.task 'sprites@2x', ['sprites@1x'], ->

  stream = gulp.src 'static/sprites@2x/**/*.png'
    .pipe spritesmith
      imgName   : 'sprite@2x.png'
      cssName   : 'sprite@2x.styl'
