 #     $REV REPLACE
 #     github.com/jamesknelson/gulp-rev-replace/issues/23
 #*------------------------------------*/
-gulp.task 'rev:replace', ["rev:css", "rev:js", "rev:fonts", "rev:images"], () ->
-  manifest = require "./#{conf.path.dev.assets}/rev-manifest.json"
-  stream = gulp.src ["./#{conf.path.prod.css}/#{manifest['style.css']}"]
-
-  Object.keys(manifest).reduce((stream, key) ->
-    stream.pipe replace(key, manifest[key])
-  , stream)
-    .pipe gulp.dest("./#{conf.path.prod.css}")
+gulp.task 'rev:replace', ["rev:css", "rev:js"], () ->
+	manifest = require "./#{conf.path.dev.assets}/rev-manifest.json"
+	stream = gulp.src ["./#{conf.path.prod.css}/#{manifest['style.css']}"]
+
+	Object.keys(manifest).reduce((stream, key) ->
+		# could do with a regex to handle files ending the same
+		stream.pipe replace(key, manifest[key])
+	, stream)
+		.pipe gulp.dest("./#{conf.path.prod.css}")
 
 
 



#*-------------------------------------*\
#      $CLEAN
#*-------------------------------------*/
gulp.task 'clean:build', (done) ->
  del "#{conf.path.prod.assets}/**/*", done





#*-------------------------------------*\
#      $BUILD
#*-------------------------------------*/
gulp.task 'build', () ->
  runSequence "clean:build", ["rev:replace", "minify:js:vendors"]






#*------------------------------------*\
#     $REV CSS
#*------------------------------------*/
gulp.task "rev:css", ["minify:css"], () ->
  gulp.src(["#{conf.path.dev.css}/style.min.css"])
    .pipe rename('style.css')
    .pipe rev()
    .pipe rename({suffix: '.min'})
    .pipe gulp.dest(conf.path.prod.css)
