From 7550cb5fd5efdb175bfc602490bfd704c6637a96 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Mon, 20 May 2019 11:10:30 -0400 Subject: [PATCH 1/2] yalc usage instructions --- docs/latest/contributing.md | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/latest/contributing.md b/docs/latest/contributing.md index f0bd63732..f04c91d12 100644 --- a/docs/latest/contributing.md +++ b/docs/latest/contributing.md @@ -13,6 +13,44 @@ Fork the repository, make your change and submit a pull request. - [Essentials: Getting Started](./essentials/getting-started.md) - [Advanced: Architecture](./advanced/architecture.md) +### When changes impact multiple repositories + +This is a particularly tricky scenario. We don't want to publish code in one +repository, just so we can test and complete the other half of its requirements +in another. Thankfully, there are a couple of ways you can test unpublished +dependent changes locally before publishing: + +- [Use `yarn link`](https://yarnpkg.com/en/docs/cli/link) + +For example if you are working on `ohif-core` and would like to use your local +version to debug a problem in `Viewers`, simply run yarn link inside of the +`ohif-core` project. + +- If you're experiencing issues with `yarn link`, + [try `yalc`](https://github.com/whitecolor/yalc) + +Yalc provides an improved workflow as we add more and more dependent packages +that are "in-progress". This comes into play as we begin working on extensions +and their dependencies. + +```js +// Install yalc for the first time +yarn global add yalc + +// EXAMPLE: using an in-development version of ohif-core w/ Viewers locally +// 1. Navigate to ohif-core's project root +yarn install +yalc publish + +// 2. Run the following after each change to ohif-core +yarn build +yalc push . + +// 3. Use the local package in our Viewers project. Navigate to the Viewers +// Project root. +yalc add ohif-core +``` + ## Any guidance on submitting changes? While we do appreciate code contributions, triaging and integrating contributed From c4c5e731c497522e537fb61e075580a518c708c0 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Mon, 20 May 2019 11:11:11 -0400 Subject: [PATCH 2/2] More context --- docs/latest/contributing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/latest/contributing.md b/docs/latest/contributing.md index f04c91d12..82bf0b3ef 100644 --- a/docs/latest/contributing.md +++ b/docs/latest/contributing.md @@ -48,7 +48,9 @@ yalc push . // 3. Use the local package in our Viewers project. Navigate to the Viewers // Project root. +yarn install yalc add ohif-core +yarn run dev ``` ## Any guidance on submitting changes?