techdocs-backend: Remove individual preparers and generators from app backend, to use factory methods

When a new Backstage app is setup, the techdocs backend file contains all the preparers (dir, github, gitlab, etc.) and same for generators. While this providers added customizibility, it comes with a cost of complexity in setting up the app backend. New preparers' updates would need users to update their app's techdocs backend file.

Scaffolder backend has already moved to this proposed pattern.
This commit is contained in:
Himanshu Mishra
2020-12-17 10:57:39 +01:00
parent 9d7b50f2f3
commit 2ac77aeec2
6 changed files with 87 additions and 38 deletions
@@ -59,7 +59,7 @@ export async function startStandaloneServer(
const techdocsGenerator = new TechdocsGenerator(logger, config);
generators.register('techdocs', techdocsGenerator);
const publisher = Publisher.fromConfig(config, logger, discovery);
const publisher = await Publisher.fromConfig(config, { logger, discovery });
const dockerClient = new Docker();