title: How best to loop over a gulp task without iterating until each loop is complete
body: <p>Can anyone suggest the best way to build multiple css files from multiple sass files?</p>
  
  <p>Using NodeJs I'm looping through a directory. Files in that directory each have different sass variables. I need to loop through all the files and build their equivalent css.</p>
  
  <p>A simplified example:</p>
  
  <pre><code>fs.readdir('folderPath', function(err, files){
     _.forEach(files, function(file){
         return gulp
             .src(file)
             .pipe(sass())
             .pipe(gulp.dest('somewhere'))
     })
  })
  </code></pre>
  
  <p>This works but I'm processing 100s of large sass files (with many @imports) and because it's done synchronously it's incredibly slow. My pretty powerful machine crawls. It's a guess but would doing it asynchronously mean gulp isn't processing 100 streams at a time, rather one after the other?</p>
  
  <p>If it requires some sort of promise how would I go about doing that?  Or some other nice solution or suggestion?</p>
  
  <p>Thanks!</p>