Collection of packages to communicate with power supplies through serial port.
This is a monorepository, subprojects are in packages directory.
Available packages:
- power-supply-com-communicator: Facade to communicate with device
Just clone repository:
git clone https://github.com/eove/power-supply-com.git
npm install
npm run bootstrap
Packges are published on:
Use the following command to publish to npmjs.org:
npx lerna publish <version>
Then publish packages to github.com with:
npx lerna publish from-package --registry https://npm.pkg.github.com
To run tests:
npm test
This can be used in any package or in root directory (which will run tests in all packages).
To run test in an isolated docker container:
DOCKER_BUILDKIT=1 docker build -f ci/Dockerfile .
Sometimes tests work on your computer but not on CI. Running tests in a container is close enough to CI and helps debug a slight variation between different envs.
You can use npx lerna link
to create symlinks for all packages so you can modify a dependency and use it without publishing it (or modifying your node_modules
by hand).
Beware that when you install any dependency a symlink can be broken, so run link command again if any doubt.