@axis-backstage/plugin-readme 0.1.0 → 0.2.0

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.
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
@@ -8,26 +8,13 @@ Welcome to the readme plugin!
8
8
 
9
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`.
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
+ ### Where can the plugin find my README file?
12
12
 
13
- ```yaml
14
- annotations:
15
- backstage.io/source-location: url:https://github.com/AxisCommunications/backstage-plugins/blob/main/
16
- ```
17
-
18
- Currently, placing your README.md file elsewhere than in the same directory as the `catalog-info.yaml file` repository is not supported.
13
+ 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.
19
14
 
20
- The displays README files with one of the following file types:
15
+ The displays README files with one of the following file types: **md**, **MD**, **rst**, or **txt**. The plugin can also handle symlinks.
21
16
 
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
- ```
29
-
30
- The plugin can also handle symlinks in the README file.
17
+ Currently, placing your README.md file elsewhere than in the same directory as the `catalog-info.yaml file` repository is not supported.
31
18
 
32
19
  ## Note
33
20
 
@@ -39,20 +26,20 @@ You will **need** to also perform the installation instructions in [Readme Backe
39
26
 
40
27
  ```bash
41
28
  # From your Backstage root directory
42
- yarn add --cwd packages/app @axis-backstage/plugin-readme
29
+ yarn --cwd packages/app add @axis-backstage/plugin-readme
43
30
  ```
44
31
 
45
32
  2. Then, modify your entity page in `EntityPage.tsx` to include the `ReadmeCard` component that is exported from the plugin to `overviewContent``.
46
33
 
47
34
  ```tsx
48
- // In packages/app/src/components/catalog/Entity.tsx
35
+ // In packages/app/src/components/catalog/EntityPage.tsx
49
36
  import { ReadmeCard } from '@axis-backstage/plugin-readme';
50
37
 
51
38
  const overviewContent = (
52
39
  ...
53
40
  <Grid item md={6} sx={12}>
54
41
  <ReadmeCard />
55
- </Grid>
42
+ </Grid>
56
43
  ...
57
44
  )
58
45
  ```
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.0",
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",