Skip to content

Commit f78f3b8

Browse files
committed
fix(hermes-client): fix instructions to run example
1 parent 7612ad8 commit f78f3b8

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

apps/hermes/client/js/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,15 @@ By default, these updates are returned as binary data and is serialized as eithe
6969

7070
### Examples
7171

72-
The [HermesClient](./src/examples/HermesClient.ts) example demonstrates both the examples above.
73-
You can run it with `npm run example`.
74-
A full command that prints BTC and ETH price feeds, in the testnet network, looks like so:
72+
The [HermesClient](./src/examples/HermesClient.ts) example demonstrates both the
73+
examples above. To run the example:
74+
75+
1. Clone [the Pyth monorepo](https://github.com/pyth-network/pyth-crosschain)
76+
2. In the root of the monorepo, run `pnpm example:hermes-client -- <args>`. For
77+
example, to print BTC and ETH price feeds in the testnet network, run:
7578

7679
```bash
77-
npm run example -- \
80+
pnpm example:hermes-client -- \
7881
--endpoint https://hermes.pyth.network \
7982
--price-ids \
8083
0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43 \

apps/hermes/client/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"build:typescript": "tsc",
2424
"build:schemas": "openapi-zod-client ./schema.json --output src/zodSchemas.ts",
2525
"pull:schema": "curl -o schema.json -z schema.json https://hermes.pyth.network/docs/openapi.json",
26-
"example": "pnpm run build && node lib/examples/HermesClient.js",
26+
"example": "node lib/examples/HermesClient.js",
2727
"format": "prettier --write \"src/**/*.ts\"",
2828
"test:lint": "eslint src/",
2929
"prepublishOnly": "pnpm run build && pnpm run test:lint",

apps/hermes/client/js/turbo.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"build": {
1515
"dependsOn": ["build:typescript", "build:schemas"]
1616
},
17+
"example": {
18+
"dependsOn": ["build"],
19+
"cache": false
20+
},
1721
"pull:schema": {
1822
"outputs": ["schema.json"],
1923
"cache": false

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"pnpm": "^9.12.1"
88
},
99
"scripts": {
10+
"example:hermes-client": "pnpm i && turbo example --filter @pythnetwork/hermes-client --ui stream",
1011
"fix": "pnpm i && turbo fix",
1112
"start:dev": "pnpm i && turbo start:dev",
1213
"start:prod": "pnpm i && turbo start:prod",

0 commit comments

Comments
 (0)