lib/common.js
function resolveSrcString(srcProperty) {
    if (Array.isArray(srcProperty)) {
        // handle multiple tag replacement
        return Promise.all(srcProperty.map(function (item) {
            return resolveSrcString(item);
        }));
    } else if (isStream(srcProperty)) {
        return new Promise(function (resolve, reject) {
            var strings = [];

            srcProperty.pipe(buffer())
                .on('data', function (file) {
                    strings.push(file.contents.toString());
                })
                .on('error', function(error) {
                    reject(error);
                    this.end();
                })
                .once('end', function () {
                    resolve(strings);
                });
        });
    } else {
        return Promise.resolve(srcProperty);
    }
}
function resolveSrcString(srcProperty) {
    if (Array.isArray(srcProperty)) {
        // handle multiple tag replacement
        return Promise.all(srcProperty.map(function (item) {
            return resolveSrcString(item);
        }));
    } else if (isStream(srcProperty)) {
        return new Promise(function (resolve, reject) {
            var strings = [];

            srcProperty.pipe(buffer())
                .on('data', function (file) {
                    strings.push(file.contents.toString());
                })
                .on('error', function(error) {
                    reject(error);
                    this.end();
                })
                .once('end', function () {
                    resolve(strings);
                });
        });
    } else {
        return Promise.resolve(srcProperty);
    }
}
function resolveSrcString ( srcProperty ) { if ( Array . isArray ( srcProperty ) ) { // handle multiple tag replacement return Promise . all ( srcProperty . map ( function ( item ) { return resolveSrcString ( item ) ; } ) ) ; } else if ( isStream ( srcProperty ) ) { return new Promise ( function ( resolve , reject ) { var strings = [ ] ; srcProperty . pipe ( buffer ( ) ) . on ( 'data' , function ( file ) { strings . push ( file . contents . toString ( ) ) ; } ) . on ( 'error' , function ( error ) { reject ( error ) ; this . end ( ) ; } ) . once ( 'end' , function ( ) { resolve ( strings ) ; } ) ; } ) ; } else { return Promise . resolve ( srcProperty ) ; } }
Takes the src property of the task configuration and deeply "resolves" any vinyl file stream in it by turning
it into a string.

This function doesn't change the "arborescence" of the given value: all the forms with strings accepted
work with vinyl file streams.

@returns {Promise}
Takes the src property of the task configuration and deeply resolves any vinyl file stream in it by turning it into a string .