fix(docs): Added docs for multimonitor and local linking (#5247)

This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2025-07-23 10:14:01 -04:00
1 parent b77b2f3fa0
commit 83ea0ad93e
2 files changed
+129

No files matched your search

+39
View File
@@ -11,3 +11,42 @@ Local linking allows you to develop and test a library in the context of an appl
a bug that you suspect is related to a library. With Yarn, this can be achieved through the yarn link command.
You can take a look at the Cornerstonejs tutorial for linking https://www.cornerstonejs.org/docs/contribute/linking
## Linking with `bun`
The [instructions](#introduction) above describe how to use `yarn` for local linking. Some use `bun` for day-to-day
code linking and execution. The method to link locally using `bun` differs slightly.
:::tip
Linking locally with `bun` provides for running the [playwright tests](./playwright-testing.md) locally so as to include (and test) local changes from Cornerstone3D!
:::
In the local Cornerstone3D, simply replace `yarn` with `bun` for each of the commands. For example, in `cornerstone/packages/core` the following would be done.
```
# In cornerstone/packages/core
bun unlink
bun link
bun dev
```
In OHIF, edit the root `package.json` file to include the cornerstone3D packages to link and add them to the `resolutions`.
For example here is a snippet of the `package.json` file linking cornerstone core and tools locally. Add whichever
cornerstone packages to link locally in the `resolutions`.
```
...
"resolutions": {
"commander": "8.3.0",
"path-to-regexp": "0.1.12",
"@cornerstonejs/core": "link:@cornerstonejs/core",
"@cornerstonejs/tools": "link:@cornerstonejs/tools",
...
},
...
```
In OHIF, run `bun install -f` and then run OHIF using either `bun dev` or `bun dev:fast`.