title: gulp - uglify js files with browserify?
body: <p>I am following the example from <a href="https://www.npmjs.com/package/vinyl-buffer" rel="nofollow noreferrer">here</a> exactly and have my own version:</p>
  
  <pre><code>gulp.task('build-js', function() {
      var bundler = browserify('js/*.js');
  
      return bundler.pipe()
          .pipe(source('bundle.min.js'))
          .pipe(buffer())
          .pipe(sourcemaps.init())
          .pipe(uglify())
          .pipe(sourcemaps.write('./maps'))
          .pipe(gulp.dest('dist'))
          .pipe(livereload());
  });
  </code></pre>
  
  <p>But why do I get this error:</p>
  
  <pre><code>$ gulp
  [21:48:33] Using gulpfile /var/www/html/mysite/gulpfile.js
  [21:48:33] Starting 'apply-prod-environment'...
  Setting NODE_ENV to 'production'
  Successfully set NODE_ENV to production
  [21:48:33] Finished 'apply-prod-environment' after 169 μs
  [21:48:33] Starting 'build-js'...
  [21:48:33] 'build-js' errored after 11 ms
  [21:48:33] TypeError: bundler.pipe is not a function
  </code></pre>
  
  <p>What have I missed?</p>