in packages/docpack-markdown-extractor/lib/plugin.js [58:79]
MarkdownExtractor.prototype.apply = function(compiler) {
var plugin = this;
var config = this.config;
compiler.plugin(Docpack.HOOKS.INIT, this.configure.bind(this));
compiler.plugin('compilation', function(compilation) {
compilation.plugin(Docpack.HOOKS.EXTRACT, function(sources, done) {
var targets = sources.filter(function(source) {
return tools.matcher(config.match, source.absolutePath);
});
var promises = Promise.map(targets, function (source) {
return extractor(source, config.markdownOptions);
});
Promise.all(promises).then(function() {
done(null, sources);
});
});
})
};