title: Gulp to generate a file per folder
body: <p>I'm trying to write a gulp task to build javascript file and concatenate a single file for each folder, including the root folder.</p>
  
  <p>I have found this solution: <a href="https://github.com/gulpjs/gulp/blob/master/docs/recipes/running-task-steps-per-folder.md" rel="nofollow">https://github.com/gulpjs/gulp/blob/master/docs/recipes/running-task-steps-per-folder.md</a></p>
  
  <blockquote>
    <p>If you have a set of folders, and wish to perform a set of tasks on
    each, for instance...</p>
  
  <pre><code>/scripts
  /scripts/jquery/*.js
  /scripts/angularjs/*.js
  </code></pre>
    
    <p>...and want to end up with...</p>
  
  <pre><code>/scripts
  /scripts/jquery.min.js
  /scripts/angularjs.min.js
  </code></pre>
  </blockquote>
  
  <p>However, this only builds <code>*.js</code> file for all the subfolders inside <code>scripts</code> folder. I'm trying to build the <code>*.js</code> file inside the root folder scripts, i.e. my expected output will be:</p>
  
  <pre><code>/scripts.min.js
  /scripts/jquery.min.js
  /scripts/angularjs.min.js
  </code></pre>
  
  <p>I'm new to node so I'm confused now how to achieve that. Really appreciate your help on this. Thanks alot.</p>