-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
388 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ LLMLOG.md | |
.turbo/ | ||
**/*/.turbo | ||
tsconfig.tsbuildinfo | ||
dist/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,6 @@ | |
"include": ["src"], | ||
"references": [ | ||
{ "path": "../logs-react" } | ||
] | ||
], | ||
"include": ["src/**/*", "src/**/*.css"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import JSONRPCLogger, {IJSONRPCLog} from "./components/logsReact/logsReact"; | ||
export type JSONRPCLog = IJSONRPCLog; | ||
import JSONRPCLogger from "./components/logsReact/logsReact"; | ||
export type { IJSONRPCLog as JSONRPCLog } from "./components/logsReact/logsReact"; | ||
export { JSONRPCLogger }; | ||
export default JSONRPCLogger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
import ReactDOM from "react-dom"; | ||
import React from "react"; | ||
import MyApp from "./containers/MyApp"; | ||
import JSONRPCLogger from "./components/logsReact/logsReact"; | ||
|
||
ReactDOM.render(<MyApp />, document.getElementById("root")); | ||
// NOTE: This isn't what we want to do here, but it allows us to cross package build | ||
//TODO: ReactDOM.render(<MyApp />, document.getElementById("root")); | ||
|
||
import type { IJSONRPCLog } from "./components/logsReact/logsReact"; | ||
|
||
export type { IJSONRPCLog as JSONRPCLog }; | ||
export { JSONRPCLogger }; | ||
export default JSONRPCLogger; | ||
|
||
// Keep the app rendering for development | ||
if (typeof document !== 'undefined') { | ||
const MyApp = require('./containers/MyApp').default; | ||
const ReactDOM = require('react-dom'); | ||
ReactDOM.render(<MyApp />, document.getElementById("root")); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
build | ||
coverage | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18.20.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"tagFormat": "${version}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# docs-react | ||
OpenRPC documentation as a react component | ||
|
||
#### What is this? | ||
This is a react component that will render documentation for a given OpenRPC document. | ||
|
||
**Screenshot**: | ||
|
||
![image](https://user-images.githubusercontent.com/364566/54795109-1b1f5b80-4c08-11e9-9ba9-cc2f2d96c692.png) | ||
|
||
|
||
#### How do I use this? | ||
|
||
##### Installation: | ||
``` | ||
npm install --save @open-rpc/docs-react | ||
``` | ||
##### Usage: | ||
``` | ||
import Documentation from "@open-rpc/docs-react"; | ||
``` | ||
and then use it somewhere: | ||
|
||
``` | ||
<Documentation schema={schema} /> | ||
``` | ||
|
||
##### Example in a new project: | ||
|
||
###### create a new typescript project with `create-react-app` | ||
|
||
``` | ||
npx create-react-app <appname> --typescript | ||
``` | ||
|
||
``` | ||
cd <appname> | ||
npm install . | ||
npm install @open-rpc/docs-react @open-rpc/meta-schema --save | ||
``` | ||
|
||
###### index.ts | ||
``` | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Documentation from "@open-rpc/docs-react"; | ||
import { OpenrpcDocument } from '@open-rpc/meta-schema'; | ||
const schema: OpenrpcDocument = { | ||
openrpc: "1.2.4", | ||
info: { | ||
"version": "0.0.0-development", | ||
"title": "My New API" | ||
}, | ||
methods: [] | ||
}; | ||
ReactDOM.render(<Documentation schema={schema} />, document.getElementById("root")); | ||
``` | ||
|
||
###### screenshot | ||
![image](https://user-images.githubusercontent.com/364566/54797953-920e2180-4c13-11e9-9ff8-723a836d0e2c.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
clearMocks: true, | ||
coverageDirectory: '../coverage', | ||
resetMocks: true, | ||
restoreMocks: true, | ||
rootDir: './src', | ||
testEnvironment: 'jsdom', | ||
preset: 'ts-jest' | ||
}; |
Oops, something went wrong.