backstage-plugin-techdocs-addon-mermaid 0.1.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/package.json +60 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Johannes Würbach
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # backstage-plugin-techdocs-addon-mermaid
2
+
3
+ The backstage-plugin-techdocs-addon-mermaid allows to render [Mermaid](https://mermaid-js.github.io/) diagrams in your [Backstage TechDocs](https://backstage.io/docs/features/techdocs/techdocs-overview)
4
+
5
+ This plugin is a [Backstage TechDocs Addon](https://backstage.io/docs/features/techdocs/addons), which requires Backstage v1.2+
6
+
7
+ ## Getting started
8
+
9
+ Follow https://backstage.io/docs/features/techdocs/addons#installing-and-using-addons to use this addon.
10
+
11
+
12
+ ```ts
13
+ import { Mermaid } from 'backstage-plugin-techdocs-addon-mermaid';
14
+
15
+ {techDocsPage}
16
+ <TechDocsAddons>
17
+ ...
18
+ <Mermaid />
19
+ </TechDocsAddons>
20
+ ```
21
+
22
+ ## Use Mermaid in your TechDocs
23
+
24
+ ~~~
25
+ ```mermaid
26
+ graph TD;
27
+ A-->B;
28
+ A-->C;
29
+ B-->D;
30
+ C-->D;
31
+ ```
32
+ ~~~
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "backstage-plugin-techdocs-addon-mermaid",
3
+ "version": "0.1.0",
4
+ "main": "dist/index.esm.js",
5
+ "types": "dist/index.d.ts",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "main": "dist/index.esm.js",
10
+ "types": "dist/index.d.ts"
11
+ },
12
+ "backstage": {
13
+ "role": "frontend-plugin"
14
+ },
15
+ "keywords": [
16
+ "backstage",
17
+ "techdocs",
18
+ "mermaid"
19
+ ],
20
+ "scripts": {
21
+ "start": "backstage-cli package start",
22
+ "build": "backstage-cli package build",
23
+ "lint": "backstage-cli package lint",
24
+ "test": "backstage-cli package test",
25
+ "clean": "backstage-cli package clean",
26
+ "prepack": "backstage-cli package prepack",
27
+ "postpack": "backstage-cli package postpack"
28
+ },
29
+ "dependencies": {
30
+ "@backstage/core-components": "^0.9.3",
31
+ "@backstage/core-plugin-api": "^1.0.1",
32
+ "@backstage/plugin-techdocs-react": "^0.1.1-next.0",
33
+ "@backstage/theme": "^0.2.15",
34
+ "@material-ui/core": "^4.9.13",
35
+ "@material-ui/icons": "^4.9.1",
36
+ "@material-ui/lab": "4.0.0-alpha.57",
37
+ "mermaid": "^9.0.1",
38
+ "react-use": "^17.2.4"
39
+ },
40
+ "peerDependencies": {
41
+ "react": "^16.13.1 || ^17.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@backstage/cli": "^0.17.1-next.0",
45
+ "@backstage/core-app-api": "^1.0.1",
46
+ "@backstage/dev-utils": "^1.0.2-next.0",
47
+ "@backstage/test-utils": "^1.0.2-next.0",
48
+ "@testing-library/jest-dom": "^5.10.1",
49
+ "@testing-library/react": "^12.1.3",
50
+ "@testing-library/user-event": "^14.0.0",
51
+ "@types/jest": "*",
52
+ "@types/mermaid": "^8.2.9",
53
+ "@types/node": "*",
54
+ "msw": "^0.35.0",
55
+ "cross-fetch": "^3.1.5"
56
+ },
57
+ "files": [
58
+ "dist"
59
+ ]
60
+ }