techdocs: make builder optional

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2024-05-07 14:28:02 +02:00
parent 178ffdd402
commit 8a18e9ef38
5 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ export interface Config {
* Documentation building process depends on the builder attr
* @visibility frontend
*/
builder: 'local' | 'external';
builder?: 'local' | 'external';
/**
* Techdocs generator information
@@ -29,6 +29,8 @@ export class DefaultDocsBuildStrategy implements DocsBuildStrategy {
}
async shouldBuild(_: { entity: Entity }): Promise<boolean> {
return this.config.getString('techdocs.builder') === 'local';
return [undefined, 'local'].includes(
this.config.getOptionalString('techdocs.builder'),
);
}
}