add more default files

Signed-off-by: Kurt King <kurtaking@gmail.com>
This commit is contained in:
Kurt King
2022-11-23 07:04:55 -06:00
parent f087d8f47d
commit 989c62ec50
6 changed files with 53 additions and 0 deletions
@@ -0,0 +1,14 @@
# {{id}}
Welcome to the {{id}} web-library plugin!
_This plugin was created through the Backstage CLI_
## Getting started
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn
start` in the root directory, and then navigating to [/{{id}}](http://localhost:3000/{{id}}).
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
@@ -0,0 +1 @@
export { {{ pluginVar }}, {{ extensionName }} } from './plugin';
@@ -0,0 +1,7 @@
import { {{ pluginVar }} } from './plugin';
describe('{{ id }}', () => {
it('should export plugin', () => {
expect({{ pluginVar }}).toBeDefined();
});
});
@@ -0,0 +1,19 @@
import { createPlugin, createRoutableExtension } from '@backstage/core-plugin-api';
import { rootRouteRef } from './routes';
export const {{ pluginVar }} = createPlugin({
id: '{{ id }}',
routes: {
root: rootRouteRef,
},
});
export const {{ extensionName }} = {{ pluginVar }}.provide(
createRoutableExtension({
name: '{{ extensionName }}',
component: () =>
import('./components/ExampleComponent').then(m => m.ExampleComponent),
mountPoint: rootRouteRef,
}),
);
@@ -0,0 +1,12 @@
{
"extends": "@backstage/cli/config/tsconfig.json",
"include": [
"src",
"dev"
],
"exclude": ["node_modules"],
"compilerOptions": {
"outDir": "dist-types",
"rootDir": "."
}
}