@axis-backstage/plugin-readme 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +13 -22
  3. package/package.json +9 -9
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @axis-backstage/plugin-readme
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a67c963: Bumped Backstage to version 1.20.3
package/README.md CHANGED
@@ -2,32 +2,23 @@
2
2
 
3
3
  Welcome to the readme plugin!
4
4
 
5
- ![home](media/readme-card.png)
5
+ ![readme-card](https://github.com/AxisCommunications/backstage-plugins/blob/main/plugins/readme/media/readme-card.png)
6
6
 
7
7
  ## Introduction
8
8
 
9
- The `README-plugin` enables easy access and viewing of the README.md file. By having information such as the project's purpose, usage instructions, or installation details as a central part of the EntityPage, we hope to improve the `onboarding and understanding of entities`.
9
+ The `Readme-plugin` enables easy access and viewing of the README file. By having information such as the project's purpose, usage instructions, or installation details as a central part of the EntityPage, we hope to improve the `onboarding and understanding of entities`.
10
10
 
11
- The README.md file is always retrieved from the same directory as the `catalog-info.yaml file`, also known as the `entity source location`. If you wish to view the path where the plugin looks for your README.md file, you can find it in the backstage.io/source-location annotation in the catalog-info.yaml file (see the example below). This annotation is automatically added to your entity, so there is no need to add it manually.
11
+ The plugin **supports all ScmIntegrations**, like Gerrit & GitLab. This makes it possible for organizations with many Source Code Integrations to use the same plugin.
12
12
 
13
- ```yaml
14
- annotations:
15
- backstage.io/source-location: url:https://github.com/AxisCommunications/backstage-plugins/blob/main/
16
- ```
13
+ It also supports various file extentions such as README.md, README.MD, README.txt, README, and README.rst.
17
14
 
18
- Currently, placing your README.md file elsewhere than in the same directory as the `catalog-info.yaml file` repository is not supported.
15
+ ### Where can the plugin find my README file?
19
16
 
20
- The displays README files with one of the following file types:
17
+ The README.md file is always retrieved from the same directory as the `catalog-info.yaml file`, also known as the `entity source location`. If you wish to view the path where the plugin looks for your README.md file, you can find it in the backstage.io/source-location annotation in the catalog-info.yaml file. This annotation is automatically added to your entity, so there is no need to add it manually.
21
18
 
22
- ```ts
23
- { name: 'README', type: 'text/plain' },
24
- { name: 'README.md', type: 'text/markdown' },
25
- { name: 'README.rst', type: 'text/plain' },
26
- { name: 'README.txt', type: 'text/plain' },
27
- { name: 'README.MD', type: 'text/markdown' },
28
- ```
19
+ The displays README files with one of the following file types: **md**, **MD**, **rst**, or **txt**. The plugin can also handle symlinks.
29
20
 
30
- The plugin can also handle symlinks in the README file.
21
+ Currently, placing your README.md file elsewhere than in the same directory as the `catalog-info.yaml file` repository is not supported.
31
22
 
32
23
  ## Note
33
24
 
@@ -39,20 +30,20 @@ You will **need** to also perform the installation instructions in [Readme Backe
39
30
 
40
31
  ```bash
41
32
  # From your Backstage root directory
42
- yarn add --cwd packages/app @axis-backstage/plugin-readme
33
+ yarn --cwd packages/app add @axis-backstage/plugin-readme
43
34
  ```
44
35
 
45
36
  2. Then, modify your entity page in `EntityPage.tsx` to include the `ReadmeCard` component that is exported from the plugin to `overviewContent``.
46
37
 
47
38
  ```tsx
48
- // In packages/app/src/components/catalog/Entity.tsx
39
+ // In packages/app/src/components/catalog/EntityPage.tsx
49
40
  import { ReadmeCard } from '@axis-backstage/plugin-readme';
50
41
 
51
42
  const overviewContent = (
52
43
  ...
53
44
  <Grid item md={6} sx={12}>
54
45
  <ReadmeCard />
55
- </Grid>
46
+ </Grid>
56
47
  ...
57
48
  )
58
49
  ```
@@ -61,9 +52,9 @@ const overviewContent = (
61
52
 
62
53
  The readme card is located in the overview page on the entity page. From the card header it is also possible to open a dialog displaying the full README.md.
63
54
 
64
- ![home](media/readme-card.png)
55
+ ![readme-card](https://github.com/AxisCommunications/backstage-plugins/blob/main/plugins/readme/media/readme-card.png)
65
56
 
66
- ![home](media/readme-dialog.png)
57
+ ![readme-dialog](https://github.com/AxisCommunications/backstage-plugins/blob/main/plugins/readme/media/readme-dialog.png)
67
58
 
68
59
  ### Troubleshooting
69
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axis-backstage/plugin-readme",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "main": "dist/index.esm.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@backstage/catalog-model": "^1.4.3",
27
- "@backstage/core-components": "^0.13.6",
28
- "@backstage/core-plugin-api": "^1.7.0",
29
- "@backstage/plugin-catalog-react": "^1.9.0",
30
- "@backstage/theme": "^0.4.3",
27
+ "@backstage/core-components": "^0.13.8",
28
+ "@backstage/core-plugin-api": "^1.8.0",
29
+ "@backstage/plugin-catalog-react": "^1.9.1",
30
+ "@backstage/theme": "^0.4.4",
31
31
  "@material-ui/core": "^4.12.2",
32
32
  "@material-ui/icons": "^4.9.1",
33
33
  "@material-ui/lab": "4.0.0-alpha.61",
@@ -37,10 +37,10 @@
37
37
  "react": "^16.13.1 || ^17.0.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@backstage/cli": "^0.23.0",
41
- "@backstage/core-app-api": "^1.11.0",
42
- "@backstage/dev-utils": "^1.0.22",
43
- "@backstage/test-utils": "^1.4.4",
40
+ "@backstage/cli": "^0.24.0",
41
+ "@backstage/core-app-api": "^1.11.1",
42
+ "@backstage/dev-utils": "^1.0.24",
43
+ "@backstage/test-utils": "^1.4.5",
44
44
  "@testing-library/jest-dom": "^5.10.1",
45
45
  "@testing-library/react": "^12.1.3",
46
46
  "@testing-library/user-event": "^14.0.0",