Skip to content

Commit

Permalink
chore: added TangoRPC / createWebViewChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
mattijsf committed May 30, 2023
1 parent 9b3b629 commit 6fb7447
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"example": "yarn --cwd example",
"bootstrap": "yarn example && yarn install",
"build-webview-script": "rollup -c rollup.config.mjs",
"watch-webview-script": "npx nodemon -i dist -w tango-rpc-webview-script/tango-rpc-webview-script.ts rollup -c rollup.config.mjs"
"watch-webview-script": "npx nodemon -i dist -w src/tango-rpc-webview-script.ts rollup -c rollup.config.mjs"
},
"keywords": [
"react-native",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function config({ format, minify, input, file }) {
const isJSON = file.endsWith("json")
const sourcemap = !isJSON
return {
input: `./tango-rpc-webview-script/${input}.ts`,
input: `./src/${input}.ts`,
output: {
name: "TangoRPC",
file: file,
Expand Down
9 changes: 9 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import TangoWebview from "./tango-webview"

import { createWebViewChannel } from "./tango-rpc-webview-script"

import * as _TangoRPC from "tango-rpc"

export * from "./tango-webview"

export const TangoRPC = {
..._TangoRPC,
createWebViewChannel,
}

export default TangoWebview
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
"target": "esnext",
"verbatimModuleSyntax": true,
},
"exclude": ["dist", "tango-rpc-webview-script"]
"exclude": ["dist"]
}
2 changes: 1 addition & 1 deletion tsconfig.tango-rpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"sourceMap": true,
"skipLibCheck":true,
},
"files": ["./tango-rpc-webview-script/tango-rpc-webview-script.ts"]
"files": ["./src/tango-rpc-webview-script.ts"]
}

0 comments on commit 6fb7447

Please sign in to comment.