Skip to content

Commit

Permalink
docs(readme.md): note about removing node_modules when using yarn link
Browse files Browse the repository at this point in the history
  • Loading branch information
mturley committed Nov 5, 2020
1 parent f3e6cd0 commit 4d17462
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ When you install @konveyor/lib-ui, you should get a warning from your package ma
If you need to use an unpublished branch (such as when developing an app PR and a lib-ui PR at the same time), you can reference the dependency directly from your local disk by using `yarn link` or `npm link`.

First, clone the lib-ui repo somewhere, `cd` to that clone, install and build the package, and run `yarn link`.
Unfortunately, you then need to delete `node_modules` in the lib-ui directory so the app's builder doesn't pick it up.

```sh
git clone https://github.com/konveyor/lib-ui.git konveyor-lib-ui
cd konveyor-lib-ui
yarn install
yarn build
yarn link
rm -rf node_modules
```

Then, `cd` to the app you're developing, and run `yarn link @konveyor/lib-ui` to install the linked version instead of the npm version.
Expand All @@ -52,7 +54,14 @@ cd ../virt-ui
yarn link @konveyor/lib-ui
```

If you make a change in your local lib-ui clone, run `yarn build` again and your app should pick up the changes.
If you make a change in your local lib-ui clone, reinstall its dependencies, rebuild, and remove them. Your app should then pick up the changes.

```sh
cd ../konveyor-lib-ui
yarn install
yarn build
rm -rf node_modules
```

When you're done, in your app repo, unlink the package and force a reinstall of the npm version:

Expand Down

0 comments on commit 4d17462

Please sign in to comment.