title: gulp: uglify and sourcemaps
body: <p>I am using gulp. </p>
  
  <p>I would like to having one or multiple JS files (say jQuery) to combine them in one, minify it, and write it to a distribution folder. </p>
  
  <p>This is how I do it: </p>
  
  <pre><code>minifyJS(['/js/myModule.file1.js',
            '/js/myModule.file2.js'], '/dist/js', 'myModule')
  </code></pre>
  
  <p>the function: </p>
  
  <pre><code>function minifyJS(sourceFiles, destinationFolder, filenameRoot) {
      return gulp.src(sourceFiles)
          .pipe(plumber())
  
          // .pipe(sourcemaps.init()) here ???
          .pipe(concat(filenameRoot + '.js'))
          .pipe(sourcemaps.init()) // or here ???
  
          .pipe(gulp.dest(destinationFolder)) // save .js
          .pipe(uglify({ preserveComments: 'license' }))
          .pipe(rename({ extname: '.min.js' }))
          .pipe(gulp.dest(destinationFolder)) // save .min.js
          .pipe(sourcemaps.write('maps'))
          .pipe(gulp.dest(destinationFolder)) // save .map
  }
  </code></pre>
  
  <p>What I am not sure about is the <code>sourcemaps.init()</code> location...   </p>
  
  <p>Should I create multiple (2 in my case) map files (that would be nice if is supported by browsers) or only one (<em>/maps/myModule.map</em>)?</p>