   .pipe(sourcemaps.write())
   .pipe(gulp.dest(paths.dest.css))
 
-gulp.task 'css', ->
+gulp.task 'css', ['clean'], ->
   gulp.src(paths.src.assets.css)
   .pipe(urlAdjuster(prepend: '/img/'))
   .pipe(prefix())

  .pipe(gulp.dest(paths.dest.app))
  cb()

gulp.task 'templates', ->
  gulp.src(paths.src.app.jade, base: '.')
  .pipe(gulp.dest(paths.dest.app))

gulp.task 'assets-coffee', ['assets-lint'], ->
  gulp.src(paths.src.assets.coffee)
  .pipe(coffee().on('error', gutil.log))
  .pipe(uglify())
  .pipe(concat('default.js'))
  .pipe(gulp.dest(paths.dest.js))

gulp.task 'js', ->
  gulp.src(paths.src.assets.js)
  .pipe(uglify())
  .pipe(concat('lib.js'))
  .pipe(gulp.dest(paths.dest.js))

gulp.task 'img', ->
  gulp.src(paths.src.assets.img)
  .pipe(gulp.dest(paths.dest.img))

gulp.task 'less', ->
  gulp.src(paths.src.assets.less)
  .pipe(sourcemaps.init())
  .pipe(less(paths: paths.bower)).on('error', gutil.log)

        'bower_components/select2/select2-spinner.gif'
      ]
  dest:
    app: 'build/'
    css: 'build/public/css'
    js: 'build/public/js'
    img: 'build/public/img'
}

gulp.task 'app-coffee', ['clean', 'app-lint'], (cb) ->
  gulp.src(paths.src.app.coffee, base: '.')
  .pipe(sourcemaps.init(sourceRoot: '../'))
  .pipe(coffee(bare: true).on('error', gutil.log))
