title: How to alias a module with Browserify lib in Gulp?
body: <p>The Browserify readme describes creating external requires like so:
  <code>
  $ browserify -r through -r duplexer -r ./my-file.js:my-module &gt; bundle.js
  </code></p>
  
  <p>Then in your page you can do:</p>
  
  <pre><code>&lt;script src="bundle.js"&gt;&lt;/script&gt;
  &lt;script&gt;
    var through = require('through');
    var duplexer = require('duplexer');
    var myModule = require('my-module');
    /* ... */
  &lt;/script&gt;
  </code></pre>
  
  <p>This works if you want to do use the command line, but I'd like to use Browserify in a gulpfile.  But there seems to be no way to add a name to a module like <code>./myfile-js:my-module</code> in the example.  If there's an option for it, I haven't found it.  The only way to require my module in the way that they describe is to do <code>require(3)</code> because Browserify seems to give numbers to the modules, but these numbers change and clearly this is not desirable.</p>
  
  <p>EDIT: My current solution is to do this:</p>
  
  <pre><code>var shell = require('gulp-shell');
  
  gulp.task('browserify', shell.task([
    'browserify -r ./src/bundle.js:bundle &gt; ./build/bundle.js'
  ]))
  </code></pre>
  
  <p>This is a workaround and not optimal if I want to take full advantage of the Gulp pipeline.  I'd like to know how this can be done without the command line or, if not, why this is only something that can be done via CLI?</p>