title: From Grunt to Gulp
body: <p>I am currently experimenting with converting my Grunt files to Gulp files. My first try was with a quite simple file which simply runs JSHint and Mocha, and has a watch mode. My first result was quite … well … disillusioning.</p>
  
  <p>I encountered several problems, and I hope that there is a way to solve them:</p>
  
  <ul>
  <li>I realized that Gulp runs all the tasks asynchronously. If I want to wait for a task to finish, the documentation tells me to use a callback, a promise or to return a stream. But how do I do this with <code>gulp-mocha</code> and <code>gulp-jshint</code>? Do these plugins support this?</li>
  <li>A failing <code>gulp-jshint</code> did not fail the build. How do I tell Gulp to stop proceeding if <code>gulp-jshint</code> failed?</li>
  <li>Using <code>watch</code> mode as described in Gulp's getting started guide resulted in a <code>Too many open files</code> error when running <code>gulp</code>. Any idea of what might be wrong?</li>
  </ul>
  
  <p>(Please note that I intentionally did not specify source code here, as the first two questions are general questions, and the last one refers to the default file.)</p>
  
  <p>Any help on this?</p>