src/inject/index.js
function handleVinylStream(sources, opt) {
  var collected = streamToArray(sources);

  return through2.obj(function (target, enc, cb) {
    if (target.isStream()) {
      return cb(error('Streams not supported for target templates!'));
    }
    collected.then(function (collection) {
      target.contents = getNewContent(target, collection, opt);
      this.push(target);
      cb();
    }.bind(this))
      .catch(function (error) {
        cb(error);
      });
  });
}
function handleVinylStream(sources, opt) {
  var collected = streamToArray(sources);

  return through2.obj(function (target, enc, cb) {
    if (target.isStream()) {
      return cb(error('Streams not supported for target templates!'));
    }
    collected.then(function (collection) {
      target.contents = getNewContent(target, collection, opt);
      this.push(target);
      cb();
    }.bind(this))
      .catch(function (error) {
        cb(error);
      });
  });
}
function handleVinylStream ( sources , opt ) { var collected = streamToArray ( sources ) ; return through2 . obj ( function ( target , enc , cb ) { if ( target . isStream ( ) ) { return cb ( error ( 'Streams not supported for target templates!' ) ) ; } collected . then ( function ( collection ) { target . contents = getNewContent ( target , collection , opt ) ; this . push ( target ) ; cb ( ) ; } . bind ( this ) ) . catch ( function ( error ) { cb ( error ) ; } ) ; } ) ; }
Handle injection when files to
inject comes from a Vinyl File Stream

@param {Stream} sources
@param {Object} opt
@returns {Stream}
Handle injection when files to inject comes from a Vinyl File Stream