Skip to content

Commit

Permalink
fix: update readme
Browse files Browse the repository at this point in the history
Signed-off-by: LE SAULNIER Kevin <[email protected]>
  • Loading branch information
LE SAULNIER Kevin committed Feb 29, 2024
1 parent 99836a4 commit 5863c97
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ Installation using npm:

#### For developers

For development purpose, you can run 'npm run watch' for hot building (rebuild after a code save).
Your consumer project should point on the local distribution. Edit your package.json depedencies :
'"powsybl-diagram-viewer": "file: path/to/powsybl-diagram-viewer",'
For development purpose, to install this library locally from an app, you should run these commands in the library project :
- npm install
- npm run build
- npm pack

Before importing this library locally from a main project, run this command in order to prevent duplicate React instances :
'npm link {path_to_main_project}/node_modules/react'
Then in the app project :
- npm install {PATH_TO_LIBRARY}/powsybl-diagram-viewer-{LIBRARY_VERSION}.tgz

*Warning* : with Create React App, we realised the library was not updating correctly if you try to install the library multiple times.
To fix this, run this command from the app **after** running "npm install"
- rm -Rf node_modules/.cache

#### For integrators

Expand Down

0 comments on commit 5863c97

Please sign in to comment.