         src: devCopySources
         dest: '.tmp'
         rename: (dest, src) -> "#{dest}/#{src.replace(/(backend-mock\/|\.json$)/g, '')}"
+      dev_less:
+        expand: true
+        cwd: 'app'
+        src: lessSources
+        dest: '.tmp'
+      dev_coffee:
+        expand: true
+        cwd: 'app'
+        src: coffeeSources
+        dest: '.tmp'
       dist:
         expand: true
         cwd: 'app'


    watch:
      less:
        files: ['.tmp/less/**/*.less']
        tasks: ['less:dev']
      coffee:
        files: ['.tmp/scripts/**/*.coffee']
        tasks: ['coffee:dev']
#      copy: TODO: break down into smaller tasks. this takes too long and also triggers coffee + less
#        files: devCopySources.map (src) -> "app/#{src}"
#        tasks: ['copy:dev']
      htmlbuild:
        files: ['app/app.html']
        tasks: ['htmlbuild:dev']

  grunt.loadNpmTasks 'grunt-shell'
  grunt.loadNpmTasks 'grunt-contrib-connect'

  grunt.registerTask 'copy_dev', ['copy:dev', 'copy:dev_less', 'copy:dev_coffee']
  grunt.registerTask 'compile_dev', ['coffee:dev', 'less:dev', 'htmlbuild:dev']
  grunt.registerTask 'compile_dist', ['coffee:dist', 'less:dist', 'uglify', 'htmlbuild:dist']
  grunt.registerTask 'dev', ['bower', 'copy_dev', 'compile_dev', 'connect:dev', 'watch']
  grunt.registerTask 'test', ['karma:dev']
  grunt.registerTask 'dist', ['bower', 'compile_dist', 'copy:dist']
  grunt.registerTask 'ci', ['dist','karma:ci','shell:git_tag','shell:git_push_tag']