Gulp browserify with directory as source
<p>I'm trying to set up a gulp task in which browserify works its way through a directory instead of one specific file.</p>

<p>Currently my task is looking like this</p>

<pre><code>gulp.task('javascript', function () {
  var browserified = transform(function(filename) {
    var b = browserify(filename);
    return b.bundle();  
  });

  return gulp.src(['js/src/**/*.js'])
    .pipe(browserified)
    .pipe(uglify())
    .pipe(gulp.dest('js/*.js'));
});
</code></pre>

<p>Which is basically a tweaked version of the code explained in this article: <a href="https://wehavefaces.net/gulp-browserify-the-gulp-y-way-bb359b3f9623" rel="nofollow">https://wehavefaces.net/gulp-browserify-the-gulp-y-way-bb359b3f9623</a></p>

<p>However, I'm getting a <code>TypeError: dest.write is not a function</code> error. I'm getting the <code>dest.write</code> error because something changed in the <code>browserify</code> or <code>vinyl-transform</code> API, according to this Github issue: <a href="https://github.com/hughsk/vinyl-transform/issues/7" rel="nofollow">https://github.com/hughsk/vinyl-transform/issues/7</a></p>

<p>What would be a (preferably as elegant as this) way to make browserify work through a directory and return all files in there in the <code>dist</code> folder.</p>