build(docs-infra): fail gently if a changed file is unknown (#40479)
When using `docs-watch` we try to match the changed file to a dgeni package in order to trigger a minimal set of processors. Previously, if the changed file could not be matched we emitted an ugly error. Now we provide a helpeful message. PR Close #40479
This commit is contained in:
parent
4a9f7daf37
commit
ead9ccd566
|
@ -51,6 +51,10 @@ module.exports = {
|
|||
generateDocs: function(changedFile, options = {}) {
|
||||
const {Dgeni} = require('dgeni');
|
||||
const package = createPackage(changedFile);
|
||||
if (package === undefined) {
|
||||
console.log('The changed file was not matched to a dgeni package - skipping doc-gen');
|
||||
return Promise.resolve();
|
||||
}
|
||||
if (options.silent) {
|
||||
package.config(function(log) { log.level = 'error'; });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue