@pfeifferj/plugin-scaffolder-backend-module-read-file
v0.0.9
Published
The read file module for plugin-scaffolder-backend-module-read-file.
Downloads
5
Readme
@pfeifferj/plugin-scaffolder-backend-module-read-file
The read file module for @pfeifferj/plugin-scaffolder-backend-module-read-file.
Accepts a file path and returns file content as a string.
quickstart
Install package
yarn add --cwd packages/backend @pfeifferj/plugin-scaffolder-backend-module-read-file
Import plugin into scaffolder.ts
import { CatalogClient } from '@backstage/catalog-client';
import {
createBuiltinActions,
createRouter,
} from '@backstage/plugin-scaffolder-backend';
import { Router } from 'express';
import type { PluginEnvironment } from '../types';
import { readFileAction } from '@pfeifferj/plugin-scaffolder-backend-module-read-file'; // here
import { ScmIntegrations } from '@backstage/integration';
import { createConfluenceToMarkdownAction } from '@backstage/plugin-scaffolder-backend-module-confluence-to-markdown';
and add actions
const actions = [
...builtInActions,
readFileAction(), // here
createConfluenceToMarkdownAction({
integrations,
config: env.config,
reader: env.reader,
}),
];
This plugin was created through the Backstage CLI