in packages/docpack-page-generator/lib/plugin.js [137:155]
PageGeneratorPlugin.prototype.select = function(sources) {
var config = this.config;
var targets = sources;
if (config.match) {
targets = sources.filter(function (source) {
return tools.matcher(config.match, source.absolutePath);
});
}
if (typeof config.select == 'function') {
targets = config.select(sources);
if (!Array.isArray(targets)) {
throw new Error('`select` should return an array');
}
}
return targets;
};