packages/browser-sync-ui/lib/resolve-plugins.js
function resolvePluginFiles (collection, relPath) {
    return Immutable.fromJS(collection.reduce(function (all, item) {
        var full = path.join(relPath, item);
        if (fs.existsSync(full)) {
            all[full] = fs.readFileSync(full, "utf8");
        }
        return all;
    }, {}));
}
function resolvePluginFiles (collection, relPath) {
    return Immutable.fromJS(collection.reduce(function (all, item) {
        var full = path.join(relPath, item);
        if (fs.existsSync(full)) {
            all[full] = fs.readFileSync(full, "utf8");
        }
        return all;
    }, {}));
}
function resolvePluginFiles ( collection , relPath ) { return Immutable . fromJS ( collection . reduce ( function ( all , item ) { var full = path . join ( relPath , item ) ; if ( fs . existsSync ( full ) ) { all [ full ] = fs . readFileSync ( full , "utf8" ) ; } return all ; } , { } ) ) ; }
Read & store a file from a plugin
@param {Array|Immutable.List} collection
@param {String} relPath
@returns {any}
Read & store a file from a plugin