Skip to content

Node.js lib to communicate with power supply devices

Notifications You must be signed in to change notification settings

eove/power-supply-com

Repository files navigation

power-supply-com

Build Status

Collection of packages to communicate with power supplies through serial port.

This is a monorepository, subprojects are in packages directory.

Packages

Available packages:

For developers

Installation

Just clone repository:

git clone https://github.com/eove/power-supply-com.git

Then bootstrap with lerna:

npm install
npm run bootstrap

Publishing

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

Tests

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.

Link packages to speed up feedbacks

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.