index.js
function (variables, bundleHandler) {
		// handle if bundleHandler specified in first argument
		if (!bundleHandler && typeof (variables) === 'function') {
			bundleHandler = variables;
			variables = null;
		}

		return through2.obj(function (file, enc, cb) {
			if (!checkFile(file, cb))
				return;

			var ext = path.extname(file.path).toLowerCase();
			var resultFileName = path.basename(file.path, ext);

			var bundleFiles = processBundleFile(file, ext, variables, bundleHandler, cb);
			if (file.sourceMap)
				bundleFiles = bundleFiles.pipe(sourcemaps.init());
			bundleFiles
				.pipe(concat(resultFileName))
				.pipe(pushTo(this))
				.on('end', cb);
		});
	}
function (variables, bundleHandler) {
		// handle if bundleHandler specified in first argument
		if (!bundleHandler && typeof (variables) === 'function') {
			bundleHandler = variables;
			variables = null;
		}

		return through2.obj(function (file, enc, cb) {
			if (!checkFile(file, cb))
				return;

			var ext = path.extname(file.path).toLowerCase();
			var resultFileName = path.basename(file.path, ext);

			var bundleFiles = processBundleFile(file, ext, variables, bundleHandler, cb);
			if (file.sourceMap)
				bundleFiles = bundleFiles.pipe(sourcemaps.init());
			bundleFiles
				.pipe(concat(resultFileName))
				.pipe(pushTo(this))
				.on('end', cb);
		});
	}
function ( variables , bundleHandler ) { // handle if bundleHandler specified in first argument if ( ! bundleHandler && typeof ( variables ) === 'function' ) { bundleHandler = variables ; variables = null ; } return through2 . obj ( function ( file , enc , cb ) { if ( ! checkFile ( file , cb ) ) return ; var ext = path . extname ( file . path ) . toLowerCase ( ) ; var resultFileName = path . basename ( file . path , ext ) ; var bundleFiles = processBundleFile ( file , ext , variables , bundleHandler , cb ) ; if ( file . sourceMap ) bundleFiles = bundleFiles . pipe ( sourcemaps . init ( ) ) ; bundleFiles . pipe ( concat ( resultFileName ) ) . pipe ( pushTo ( this ) ) . on ( 'end' , cb ) ; } ) ; }
concatenates files from bundle and replaces bundle file in current pipe first parameter is function that handles source stream for each bundle
concatenates files from bundle and replaces bundle file in current pipe first parameter is function that handles source stream for each bundle