Prettify how to

Signed-off-by: Nikolas Skoufis <nskoufis@seek.com.au>
This commit is contained in:
Nikolas Skoufis
2022-03-01 09:05:59 +11:00
parent 0bedff8c9a
commit 55031596f2
+6 -1
View File
@@ -566,6 +566,7 @@ To achieve this hybrid build model:
a given entity.
For example, to only build docs when an entity has the `company.com/techdocs-builder`
annotation set to `'local'`:
```typescript
export class AnnotationBasedBuildStrategy {
private readonly config: Config;
@@ -575,10 +576,14 @@ To achieve this hybrid build model:
}
async shouldBuild(_: Entity): Promise<boolean> {
return this.entity.metadata?.annotations?.["company.com/techdocs-builder"] === 'local'
return (
this.entity.metadata?.annotations?.['company.com/techdocs-builder'] ===
'local'
);
}
}
```
4. Pass an instance of this Build Strategy as the `docsBuildStrategy` parameter of the
TechDocs backend `createRouter` method.