Mob/techdocs end to end (#1736)
* Initial techdocs end to end heavily inspired by scaffolder * added some tests and fixed linting * fix(techdocs-backend): fix eslint * fix(techdocs-backend): cleanup commented test * Removed unused dependency * fix(techdocs-backend): updated standalone server * moved type dependency to devDependencies * fix: updated dependencies and devDependencies. * Update plugins/techdocs-backend/src/techdocs/stages/generate/types.ts Co-authored-by: Emma Indal <emma.indahl@gmail.com> Co-authored-by: Emma Indal <emmai@spotify.com> Co-authored-by: ellinors <ellinors@spotify.com> Co-authored-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9d6a1c350a
commit
97f3f58844
@@ -14,9 +14,37 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createRouter } from '@backstage/plugin-techdocs-backend';
|
||||
import {
|
||||
createRouter,
|
||||
DirectoryPreparer,
|
||||
Preparers,
|
||||
Generators,
|
||||
LocalPublish,
|
||||
TechdocsGenerator
|
||||
} from '@backstage/plugin-techdocs-backend';
|
||||
import { PluginEnvironment } from '../types';
|
||||
import Docker from 'dockerode';
|
||||
|
||||
export default async function createPlugin({ logger }: PluginEnvironment) {
|
||||
return await createRouter({ logger });
|
||||
export default async function createPlugin({ logger, config }: PluginEnvironment) {
|
||||
const generators = new Generators();
|
||||
const techdocsGenerator = new TechdocsGenerator();
|
||||
generators.register('techdocs', techdocsGenerator);
|
||||
|
||||
const directoryPreparer = new DirectoryPreparer();
|
||||
const preparers = new Preparers();
|
||||
|
||||
preparers.register('dir', directoryPreparer);
|
||||
|
||||
const publisher = new LocalPublish();
|
||||
|
||||
const dockerClient = new Docker();
|
||||
|
||||
return await createRouter({
|
||||
preparers,
|
||||
generators,
|
||||
publisher,
|
||||
dockerClient,
|
||||
logger,
|
||||
config,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user