in src/Dgeni.ts [160:186]
generate() {
const injector = this.configureInjector();
const log = injector.get('log');
let processingPromise = this.triggerEvent('generationStart');
// Process the docs
const currentDocs = [];
processingPromise = processingPromise.then(() => currentDocs);
this.processors.forEach(processor => {
processingPromise = processingPromise.then(docs => this.runProcessor(processor, docs));
});
processingPromise.catch(error => {
log.error(error.message);
if (error.stack) {
log.debug(error.stack);
}
log.error('Failed to process the docs');
});
return processingPromise.then(docs => {
this.triggerEvent('generationEnd');
return docs;
});
}