docs: format with prettier (#1218)

This commit is contained in:
Patrik Oldsberg
2020-06-09 19:50:41 +02:00
committed by GitHub
parent 4f3375073d
commit a633dce818
20 changed files with 756 additions and 364 deletions
+10 -8
View File
@@ -2,10 +2,10 @@
Backstage plugins provide features to a Backstage App.
Each plugin is treated as a self-contained web app and can include almost any type of content.
Plugins all use a common set of platform APIs and reusable UI components.
Plugins can fetch data from external sources using the regular browser APIs or by depending on
external modules to do the work.
Each plugin is treated as a self-contained web app and can include almost any
type of content. Plugins all use a common set of platform APIs and reusable UI
components. Plugins can fetch data from external sources using the regular
browser APIs or by depending on external modules to do the work.
<!-- MOVED TO create-a-plugin.md ## Creating a new plugin
On your command line, invoke the `backstage-cli` to create a new plugin:
@@ -27,17 +27,19 @@ plugin directly by navigating to `http://localhost:3000/my-plugin`.*
- Consider writing plugins in `TypeScript`.
- Plan the directory structure of your plugin so that it becomes easy to manage.
- Prefer using the Backstage components, otherwise go with [Material-UI](https://material-ui.com/).
- Prefer using the Backstage components, otherwise go with
[Material-UI](https://material-ui.com/).
- Check out the shared Backstage APIs before building a new one.
## Plugin concepts / API
### Routing
Each plugin is responsible for registering its components to corresponding routes in the app.
Each plugin is responsible for registering its components to corresponding
routes in the app.
The app will call the `createPlugin` method on each plugin, passing in a `router` object with a set
of methods on it.
The app will call the `createPlugin` method on each plugin, passing in a
`router` object with a set of methods on it.
```jsx
import { createPlugin, createRouteRef } from '@backstage/core';