From 5193a5b527f590d80809cfa31ccda6e8be5044cb Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Mon, 1 Jul 2024 18:01:16 +0200 Subject: [PATCH] feat(components): add readme for npm link --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index c7bfc2e62..2a7e96748 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,37 @@ export function App() { Here is [the Storybook documentation][lnk-documentation]. +## Testing in your project + +### Using npm link + +1. Globally link your module + +```bash +npm link +``` + +2. Link the module in a project + +```bash +cd /path/to/my-project +``` + +Add to `dependencies` ` "@mtes-mct/monitor-ui__root": "",` to `package.json` + +```bash +npm link @mtes-mct/monitor-ui__root +``` + +3. Unlink the module: + +```bash +cd /path/to/my-project +npm unlink my-module +cd /path/to/my-module +npm unlink +``` + ## Contributing Please read the [contributing document](CONTRIBUTING.md) for setup and contributing instructions.