You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -352,6 +353,46 @@ The configuration can be specified using the `REACT_APP_CONFIG` environment vari
352
353
REACT_APP_CONFIG=local yarn start
353
354
```
354
355
356
+
## Linking Slim to a Local dicom-microscopy-viewer Library
357
+
358
+
If you are developing features or fixing bugs that require changes in both Slim and the underlying [`dicom-microscopy-viewer`](https://github.com/ImagingDataCommons/dicom-microscopy-viewer) library, you can use `yarn link` to connect your local Slim project to a local clone of `dicom-microscopy-viewer`. This allows Slim to immediately use the latest local changes from the library without publishing to npm.
359
+
360
+
### Steps
361
+
362
+
1.**Clone dicom-microscopy-viewer**
363
+
If you haven't already, clone the `dicom-microscopy-viewer` repository to your machine.
364
+
365
+
2.**Set up yarn link in dicom-microscopy-viewer**
366
+
In the root directory of your local `dicom-microscopy-viewer` repository, run:
367
+
```sh
368
+
yarn link
369
+
```
370
+
371
+
3.**Link dicom-microscopy-viewer in Slim**
372
+
In the root directory of your Slim project, run:
373
+
```sh
374
+
yarn link dicom-microscopy-viewer
375
+
```
376
+
377
+
4.**Enable live rebuilding in dicom-microscopy-viewer**
378
+
To automatically rebuild `dicom-microscopy-viewer` when you make changes, run the following command in the `dicom-microscopy-viewer` directory:
379
+
```sh
380
+
yarn webpack:dynamic-import:watch
381
+
```
382
+
This will watch for file changes and rebuild the library, so Slim can immediately use the updated code.
383
+
384
+
5.**Run Slim as usual**
385
+
In the Slim directory, start the development server:
386
+
```sh
387
+
yarn start
388
+
```
389
+
Slim will now use your locally linked version of `dicom-microscopy-viewer`.
390
+
391
+
### Notes
392
+
393
+
- If you want to unlink and return to the npm-published version, run `yarn unlink dicom-microscopy-viewer` and `yarn install --force` in the Slim directory.
394
+
- Make sure both projects use compatible Node and Yarn versions to avoid dependency issues.
395
+
355
396
## Citation
356
397
357
398
For more information about the motivation, design, and capabilities of Slim, please see the following article:
0 commit comments