Skip to content

Commit d2c97cc

Browse files
committed
Changed README and package name
1 parent 1db4b4f commit d2c97cc

File tree

4 files changed

+73
-118
lines changed

4 files changed

+73
-118
lines changed

README.md

+5-48
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,27 @@
1-
# docs-react
1+
# @metamask/open-rpc-docs-react
22

33
OpenRPC documentation as a react component
44

55
#### What is this?
66

77
This is a react component that will render documentation for a given OpenRPC document.
88

9-
**Screenshot**:
10-
11-
![image](https://user-images.githubusercontent.com/364566/54795109-1b1f5b80-4c08-11e9-9ba9-cc2f2d96c692.png)
12-
139
#### How do I use this?
1410

1511
##### Installation:
1612

1713
```
18-
npm install --save @open-rpc/docs-react
14+
npm install --save @metamask/open-rpc-docs-react
1915
```
2016

2117
##### Usage:
2218

2319
```
24-
import Documentation from "@open-rpc/docs-react";
25-
```
26-
27-
and then use it somewhere:
28-
29-
```
30-
<Documentation schema={schema} />
20+
import Method from "@metamask/open-rpc-docs-react";
3121
```
3222

33-
##### Example in a new project:
34-
35-
###### create a new typescript project with `create-react-app`
36-
37-
```
38-
npx create-react-app <appname> --typescript
39-
```
23+
and then use it somewhere in a project:
4024

4125
```
42-
cd <appname>
43-
npm install .
44-
npm install @open-rpc/docs-react @open-rpc/meta-schema --save
26+
<Method method={method} />
4527
```
46-
47-
###### index.ts
48-
49-
```
50-
import React from 'react';
51-
import ReactDOM from 'react-dom';
52-
import Documentation from "@open-rpc/docs-react";
53-
import { OpenrpcDocument } from '@open-rpc/meta-schema';
54-
55-
const schema: OpenrpcDocument = {
56-
openrpc: "1.2.4",
57-
info: {
58-
"version": "0.0.0-development",
59-
"title": "My New API"
60-
},
61-
methods: []
62-
};
63-
64-
ReactDOM.render(<Documentation schema={schema} />, document.getElementById("root"));
65-
66-
```
67-
68-
###### screenshot
69-
70-
![image](https://user-images.githubusercontent.com/364566/54797953-920e2180-4c13-11e9-9ff8-723a836d0e2c.png)

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "docusaurus-open-rpc-docs-react",
3-
"version": "0.0.1",
4-
"description": "Docusaurus OpenRPC Docs React Plugin",
2+
"name": "@metamask/open-rpc-docs-react",
3+
"version": "0.0.0",
4+
"description": "OpenRPC Docs React",
55
"homepage": "https://github.com/MetaMask/openrpc-docs-react#readme",
66
"bugs": {
77
"url": "https://github.com/MetaMask/openrpc-docs-react/issues"

src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ export { default as Errors } from './Errors/Errors';
55
export { default as ExamplePairing } from './ExamplePairing/ExamplePairing';
66
export { default as ExamplePairings } from './ExamplePairings/ExamplePairings';
77
export { default as ExpansionTable } from './ExpansionTable/ExpansionTable';
8-
export { default as Info } from './Info/Info';
9-
export { default as JSONSchema } from './JSONSchema/JSONSchema';
108
export { default as Links } from './Links/Links';
119
export { default as Method } from './Method/Method';
1210
export { default as Params } from './Params/Params';

yarn.lock

+65-65
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,71 @@ __metadata:
10691069
languageName: node
10701070
linkType: hard
10711071

1072+
"@metamask/open-rpc-docs-react@workspace:.":
1073+
version: 0.0.0-use.local
1074+
resolution: "@metamask/open-rpc-docs-react@workspace:."
1075+
dependencies:
1076+
"@json-schema-tools/traverse": ^1.10.1
1077+
"@lavamoat/allow-scripts": ^2.3.1
1078+
"@lavamoat/preinstall-always-fail": ^1.0.0
1079+
"@metamask/auto-changelog": ^3.1.0
1080+
"@metamask/eslint-config": ^11.0.1
1081+
"@metamask/eslint-config-jest": ^11.0.0
1082+
"@metamask/eslint-config-nodejs": ^11.0.1
1083+
"@metamask/eslint-config-typescript": ^11.0.0
1084+
"@open-rpc/examples": ^1.6.1
1085+
"@open-rpc/meta-schema": ^1.11.0
1086+
"@rjsf/core": ^5.6.2
1087+
"@rjsf/utils": ^5.6.2
1088+
"@rjsf/validator-ajv8": ^5.6.2
1089+
"@stoplight/markdown-viewer": ^5
1090+
"@stoplight/mosaic": ^1.32
1091+
"@stoplight/mosaic-code-viewer": ^1.32
1092+
"@testing-library/react": ^11.2.2
1093+
"@types/jest": ^28.1.6
1094+
"@types/json-schema": ^7.0.11
1095+
"@types/lodash": ^4.14.194
1096+
"@types/node": ^16
1097+
"@types/react": ^18.2.6
1098+
"@types/react-dom": ^17.0.2
1099+
"@types/react-syntax-highlighter": ^15.5.6
1100+
"@typescript-eslint/eslint-plugin": ^5.43.0
1101+
"@typescript-eslint/parser": ^5.43.0
1102+
depcheck: ^1.4.3
1103+
eslint: ^8.27.0
1104+
eslint-config-prettier: ^8.5.0
1105+
eslint-plugin-import: ^2.26.0
1106+
eslint-plugin-jest: ^27.1.5
1107+
eslint-plugin-jsdoc: ^39.6.2
1108+
eslint-plugin-node: ^11.1.0
1109+
eslint-plugin-prettier: ^4.2.1
1110+
hash-color-material: ^1.1.3
1111+
jest: ^29.5.0
1112+
jest-environment-jsdom: ^29.5.0
1113+
jest-it-up: ^2.0.2
1114+
jest-transform-css: ^6.0.1
1115+
json-schema: ^0.2.3
1116+
json-schema-ref-parser: ^7.0.1
1117+
lodash: ^4.17.15
1118+
mm-json-schema-viewer: ^0.0.1
1119+
prettier: ^2.7.1
1120+
prettier-plugin-packagejson: ^2.3.0
1121+
qs: ^6.11.1
1122+
react: ^17.0.2
1123+
react-dom: ^17.0.2
1124+
react-markdown: ^8.0.7
1125+
react-syntax-highlighter: ^15.4.3
1126+
rimraf: ^3.0.2
1127+
ts-jest: ^29.1.0
1128+
ts-node: ^10.7.0
1129+
typedoc: ^0.23.15
1130+
typescript: ^5.0.4
1131+
peerDependencies:
1132+
react: ^17.0.2
1133+
react-dom: ^17.0.2
1134+
languageName: unknown
1135+
linkType: soft
1136+
10721137
"@nodelib/fs.scandir@npm:2.1.5":
10731138
version: 2.1.5
10741139
resolution: "@nodelib/fs.scandir@npm:2.1.5"
@@ -3593,71 +3658,6 @@ __metadata:
35933658
languageName: node
35943659
linkType: hard
35953660

3596-
"docusaurus-open-rpc-docs-react@workspace:.":
3597-
version: 0.0.0-use.local
3598-
resolution: "docusaurus-open-rpc-docs-react@workspace:."
3599-
dependencies:
3600-
"@json-schema-tools/traverse": ^1.10.1
3601-
"@lavamoat/allow-scripts": ^2.3.1
3602-
"@lavamoat/preinstall-always-fail": ^1.0.0
3603-
"@metamask/auto-changelog": ^3.1.0
3604-
"@metamask/eslint-config": ^11.0.1
3605-
"@metamask/eslint-config-jest": ^11.0.0
3606-
"@metamask/eslint-config-nodejs": ^11.0.1
3607-
"@metamask/eslint-config-typescript": ^11.0.0
3608-
"@open-rpc/examples": ^1.6.1
3609-
"@open-rpc/meta-schema": ^1.11.0
3610-
"@rjsf/core": ^5.6.2
3611-
"@rjsf/utils": ^5.6.2
3612-
"@rjsf/validator-ajv8": ^5.6.2
3613-
"@stoplight/markdown-viewer": ^5
3614-
"@stoplight/mosaic": ^1.32
3615-
"@stoplight/mosaic-code-viewer": ^1.32
3616-
"@testing-library/react": ^11.2.2
3617-
"@types/jest": ^28.1.6
3618-
"@types/json-schema": ^7.0.11
3619-
"@types/lodash": ^4.14.194
3620-
"@types/node": ^16
3621-
"@types/react": ^18.2.6
3622-
"@types/react-dom": ^17.0.2
3623-
"@types/react-syntax-highlighter": ^15.5.6
3624-
"@typescript-eslint/eslint-plugin": ^5.43.0
3625-
"@typescript-eslint/parser": ^5.43.0
3626-
depcheck: ^1.4.3
3627-
eslint: ^8.27.0
3628-
eslint-config-prettier: ^8.5.0
3629-
eslint-plugin-import: ^2.26.0
3630-
eslint-plugin-jest: ^27.1.5
3631-
eslint-plugin-jsdoc: ^39.6.2
3632-
eslint-plugin-node: ^11.1.0
3633-
eslint-plugin-prettier: ^4.2.1
3634-
hash-color-material: ^1.1.3
3635-
jest: ^29.5.0
3636-
jest-environment-jsdom: ^29.5.0
3637-
jest-it-up: ^2.0.2
3638-
jest-transform-css: ^6.0.1
3639-
json-schema: ^0.2.3
3640-
json-schema-ref-parser: ^7.0.1
3641-
lodash: ^4.17.15
3642-
mm-json-schema-viewer: ^0.0.1
3643-
prettier: ^2.7.1
3644-
prettier-plugin-packagejson: ^2.3.0
3645-
qs: ^6.11.1
3646-
react: ^17.0.2
3647-
react-dom: ^17.0.2
3648-
react-markdown: ^8.0.7
3649-
react-syntax-highlighter: ^15.4.3
3650-
rimraf: ^3.0.2
3651-
ts-jest: ^29.1.0
3652-
ts-node: ^10.7.0
3653-
typedoc: ^0.23.15
3654-
typescript: ^5.0.4
3655-
peerDependencies:
3656-
react: ^17.0.2
3657-
react-dom: ^17.0.2
3658-
languageName: unknown
3659-
linkType: soft
3660-
36613661
"dom-accessibility-api@npm:^0.5.6":
36623662
version: 0.5.16
36633663
resolution: "dom-accessibility-api@npm:0.5.16"

0 commit comments

Comments
 (0)