[docs] added skeleton
This commit is contained in:
@@ -17,13 +17,14 @@ type PluginHooks = {
|
||||
};
|
||||
```
|
||||
|
||||
[Read more about the router here](createPlugin-router.md)
|
||||
- [Read more about the router here](createPlugin-router.md)
|
||||
- [Read more about feature flags here](createPlugin-feature-flags.md)
|
||||
|
||||
## Example Uses
|
||||
|
||||
### Creating a basic plugin
|
||||
|
||||
Showcasing adding multiple routes and a redirect.
|
||||
Showcasing adding multiple routes, a feature flag and a redirect.
|
||||
|
||||
```jsx
|
||||
import { createPlugin } from '@backstage/core';
|
||||
@@ -31,7 +32,9 @@ import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
id: 'new-plugin',
|
||||
register({ router }) {
|
||||
register({ router, featureFlags: { registerFeatureFlag } }) {
|
||||
registerFeatureFlag('enable-example-component');
|
||||
|
||||
router.registerRoute('/new-plugin', ExampleComponent);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user