   ]
   coffee: [
     'bower_components/este-library/este/**/*.coffee'
-    'client/**/*.coffee'
-    'server/**/*.coffee'
+    'client/**/js/**/*.coffee'
+    'server/**/js/**/*.coffee'
   ]
   react: [
-    'client/**/*.jsx'
-    'server/**/*.jsx'
+    # Why this crazy /**/js/** pattern? Because one server app can have several
+    # compilation targets: client/app, client/admin, client/landingpage etc.
+    # This pattern ensures that client/whatever/build directories are ignored.
+    'client/**/js/**/*.jsx'
+    'server/**/js/**/*.jsx'
   ]
   depsPrefix: '../../../..'
   nodejs: 'bower_components/closure-library/closure/goog/bootstrap/nodejs'
   unitTests: [
     'bower_components/este-library/este/**/*_test.js'
-    'client/**/*_test.js'
+    'client/**/js/**/*_test.js'
+    'client/**/js/**/*_test.js'
   ]
   compile: [
     'bower_components/closure-library/**/*.js'
     'bower_components/este-library/este/**/*.js'
-    'client/**/*.js'
-    'server/**/*.js'
+    'client/**/js/**/*.js'
+    'server/**/js/**/*.js'
     'tmp/**/*.js'
   ]
   packages: './*.json'


  gulp.src changedFilePath ? paths.unitTests
    .pipe filter autoRequire
    .pipe mocha
      ui: 'tdd'
      reporter: 'dot'

gulp.task 'diContainer', ->
  streams = for container, i in diContainers


gulp.task 'react', ->
  gulp.src changedFilePath ? paths.react, base: '.'
    .pipe react harmony: true
    .pipe gulp.dest '.'

gulp.task 'deps', ->
