function createBundlerStreams(globPattern, destDir, transforms){
    var moduleStripRegex = /.*\//;
    var extStripRegex = /\.js/;

    return glob.sync(globPattern).map(function (thisFile){
        gutil.log("Bundling ", thisFile);
        var fileName = thisFile.replace(moduleStripRegex,'');
        var bundleName = fileName.replace(extStripRegex,'');
        var bundler = browserify({
            plugin : "browserify-derequire",
            entries: ["./" + thisFile],
            standalone: bundleName
        });
        if (transforms){
            bundler.transform({
              global: true
          }, transforms);
        }
        return bundler
        .bundle()
        .pipe(source(fileName))
        .pipe(gulp.dest(destDir));
    });
}
// Returns an array of Gulp Streams
Returns an array of Gulp Streams
Returns an array of Gulp Streams
function createBundlerStreams(globPattern, destDir, transforms){
    var moduleStripRegex = /.*\//;
    var extStripRegex = /\.js/;
    return glob.sync(globPattern).map(function (thisFile){
        gutil.log("Bundling ", thisFile);
        var fileName = thisFile.replace(moduleStripRegex,'');
        var bundleName = fileName.replace(extStripRegex,'');
        var bundler = browserify({
            plugin : "browserify-derequire",
            entries: ["./" + thisFile],
            standalone: bundleName
        });
        if (transforms){
            bundler.transform({
              global: true
          }, transforms);
        }
        return bundler
        .bundle()
        .pipe(source(fileName))
        .pipe(gulp.dest(destDir));
    });
}
function createBundlerStreams ( globPattern , destDir , transforms ) { var moduleStripRegex = / .*\/ / ; var extStripRegex = / \.js / ; return glob . sync ( globPattern ) . map ( function ( thisFile ) { gutil . log ( "Bundling " , thisFile ) ; var fileName = thisFile . replace ( moduleStripRegex , '' ) ; var bundleName = fileName . replace ( extStripRegex , '' ) ; var bundler = browserify ( { plugin : "browserify-derequire" , entries : [ "./" + thisFile ] , standalone : bundleName } ) ; if ( transforms ) { bundler . transform ( { global : true } , transforms ) ; } return bundler . bundle ( ) . pipe ( source ( fileName ) ) . pipe ( gulp . dest ( destDir ) ) ; } ) ; }
Returns an array of Gulp Streams
Returns an array of Gulp Streams