Skip to content

Commit 7ad54f8

Browse files
authored
Merge pull request #467 from morpho-org/docs/link
docs(readme): add link docs
2 parents 58fbdd2 + 0fd29b2 commit 7ad54f8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,27 @@
4646

4747
Learn [how to add a new chain configuration](./docs/adding-new-chain.md) to the sdks.
4848

49+
## Debugging
50+
51+
Here's a tutorial on how to link a specific package to debug at runtime:
52+
53+
1. From the repository in which you want to link the package: `pnpm link ../your/relative/path/to/sdks/packages/blue-sdk`
54+
55+
```diff
56+
- "@morpho-org/blue-sdk": "5.0.0",
57+
+ "@morpho-org/blue-sdk": "link:../../../sdks/packages/blue-sdk",
58+
```
59+
60+
2. Modify `blue-sdk` [package.json](./packages/blue-sdk/package.json) to use js main & js files:
61+
62+
```diff
63+
- "main": "src/index.ts",
64+
+ "main": "lib/index.js",
65+
+ "types": "lib/index.d.ts"
66+
```
67+
68+
3. In a separate process, start: `pnpm --dir packages/blue-sdk build --watch`
69+
4970
## Authors
5071

5172
- [@rubilmax](https://github.com/rubilmax) (rubilmax.eth, [Twitter](https://x.com/rubilmax))

0 commit comments

Comments
 (0)