Typescript library to integrate a powsybl svg diagram in a javascript project. The library is built with the Parcel bundler. Symply use: 'npm run build'
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",'
If you want to deploy a new version of commons-ui in the NPM package registry, you need to follow the steps below:
- Update to the new version in package.json (example
0.6.0
) - Build it:
npm install
- Commit the package.json and package-lock.json files, push to a branch, make a PR, have it reviewed and merged to main.
- Pull and checkout main on your last commit.
-
Tag your last commit :
git tag <tag>
(example:v0.6.0
) - Push tag :
git push origin <tag>
- Checkout the tag in a fresh repo copy :
cd $(mktemp -d) && git clone https://github.com/gridsuite/commons-ui.git
thencd commons-ui && git checkout <tag>
-
Test your package:
npm install
-
Login on the command line to the npm registry:
npm login
-
Publish the package:
npm publish