lib/formatStream.js
function formatStream(options) {
    if (!_.isObject(options)) {
        options = {};
    }

    var statsOptions = options.verbose === true ? _.defaults(options, DEFAULT_VERBOSE_STATS_OPTIONS) : _.defaults(options, DEFAULT_STATS_OPTIONS);

    if (!gutil.colors.supportsColor) {
        statsOptions.colors = false;
    }

    return through.obj(function(chunk, enc, cb) {
        var stats = chunk[processStats.STATS_DATA_FIELD_NAME],
            isStats = chunk[processStats.STATS_FLAG_FIELD_NAME];

        if (isStats) {
            var filename = path.resolve(chunk.path);

            gutil.log(MESSAGE, gutil.colors.magenta(tildify(filename)));
            gutil.log('\n' + stats.toString(statsOptions));
        }

        cb(null, chunk);
    });
}
function formatStream(options) {
    if (!_.isObject(options)) {
        options = {};
    }

    var statsOptions = options.verbose === true ? _.defaults(options, DEFAULT_VERBOSE_STATS_OPTIONS) : _.defaults(options, DEFAULT_STATS_OPTIONS);

    if (!gutil.colors.supportsColor) {
        statsOptions.colors = false;
    }

    return through.obj(function(chunk, enc, cb) {
        var stats = chunk[processStats.STATS_DATA_FIELD_NAME],
            isStats = chunk[processStats.STATS_FLAG_FIELD_NAME];

        if (isStats) {
            var filename = path.resolve(chunk.path);

            gutil.log(MESSAGE, gutil.colors.magenta(tildify(filename)));
            gutil.log('\n' + stats.toString(statsOptions));
        }

        cb(null, chunk);
    });
}
function formatStream ( options ) { if ( ! _ . isObject ( options ) ) { options = { } ; } var statsOptions = options . verbose === true ? _ . defaults ( options , DEFAULT_VERBOSE_STATS_OPTIONS ) : _ . defaults ( options , DEFAULT_STATS_OPTIONS ) ; if ( ! gutil . colors . supportsColor ) { statsOptions . colors = false ; } return through . obj ( function ( chunk , enc , cb ) { var stats = chunk [ processStats . STATS_DATA_FIELD_NAME ] , isStats = chunk [ processStats . STATS_FLAG_FIELD_NAME ] ; if ( isStats ) { var filename = path . resolve ( chunk . path ) ; gutil . log ( MESSAGE , gutil . colors . magenta ( tildify ( filename ) ) ) ; gutil . log ( '\n' + stats . toString ( statsOptions ) ) ; } cb ( null , chunk ) ; } ) ; }
Writes formatted string of `stats` object and displays related `webpack.config.js` file path. Can be piped.
@function
@alias formatStream
@param {Object=} options - Options to pass to {@link http://webpack.github.io/docs/node.js-api.html#stats-tostring `stats.toString()`}.
@param {Boolean} [options.verbose=false] - Writes fully formatted version of `stats` object.
@returns {Stream}
Writes formatted string of stats object and displays related webpack . config . js file path . Can be piped .