title: gulp-nodemon watch typescript files
body: <p>I have 2 directories:</p>
  
  <ul>
  <li><p>app <code>es5 javascript files compiled by gulp task</code></p></li>
  <li><p>src <code>typescript source files</code></p></li>
  </ul>
  
  <p>I want to nodemon make start script from <code>app/</code> restart on any changes in <code>src/</code> dir. But it doesn't work - App just started, but nodemon doesn't make any reloads on changes. (Looks like he doesn't watch <code>src/</code>)</p>
  
  <p>This is my <code>gulpfile</code>:</p>
  
  <pre><code>var gulp = require("gulp-help")(require("gulp")),
      ts = require("gulp-typescript"),
      nodemon = require("gulp-nodemon");
  
  /***********************************************************************************
   * Build es5 javascript files from typescript sources
   ***********************************************************************************/
  gulp.task("compile", function() {
      var project = ts.createProject({
          "target": "ES5",
          "module": "commonjs",
          "moduleResolution": "node",
          "sourceMap": true,
          "emitDecoratorMetadata": true,
          "experimentalDecorators": true,
          "removeComments": true,
          "noImplicitAny": false
      });
      return gulp.src("./src/**/*.ts")
          .pipe(project())
          .pipe(gulp.dest("./app/"))
  });
  
  /***********************************************************************************
   * Call "build" task and start nodemon with watch (autorestart on changes found)
   ***********************************************************************************/
  gulp.task("default", ["compile"], function() {
      var stream = nodemon({
          script: "app/",
          watch: "src",
          tasks: ["compile"],
          env: { "DEBUG": "Application,Request,Response" }
      });
      return stream;
  });
  </code></pre>