         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']

    'img/*'
    'lib/**/*'
    'views/**/*'
    'backend-mock/**/*.json'
  ]

  lessSources = 'less/**/*'
  coffeeSources = 'scripts/**/*.coffee'

  grunt.initConfig
    pkg: grunt.file.readJSON 'package.json'
