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

#*------------------------------------*/
gulp.task 'rev:js', ["minify:js"], () ->
  gulp.src(["#{conf.path.prod.js}/built.min.js"])
    .pipe rename('built.js')
    .pipe rev()
    .pipe rename({suffix: '.min'})
    .pipe gulp.dest(conf.path.prod.js)
    .pipe rev.manifest(conf.revManifest.path, conf.revManifest.opts)
    .pipe gulp.dest('./')

#     github.com/jamesknelson/gulp-rev-replace/issues/23
#*------------------------------------*/
gulp.task 'rev:replace', ["rev:css", "rev:js"], () ->
  manifest = require "../../#{conf.path.dev.assets}/rev-manifest.json"
  cssStream = gulp.src ["../../#{conf.path.prod.css}/#{manifest['style.css']}"]

  Object.keys(manifest).reduce((cssStream, key) ->
    regkey = key.replace('/', '\\/')
