This project enables Node.js applications to control devices that speak the REV Hub Serial Protocol (such as the REV Robotics Expansion Hub).
This project uses lerna for multi-package builds.
We have several packages currently:
librhsp
: Raw interaction with librhsp.expansion-hub
: High-level interaction with a REV expansion hub.sample
: Command line app useful for testing and showing features.
To build the app, run npx lerna run build
.
If you have other tasks you wish to create, define
them in the module's package.json like normal, and run
npx lerna run mytask
. This will run 'mytask' in every
module that has a task with that name.
Tasks in the top-level package.json can be run with
npm run
like normal.
- Check out the
main
branch. - Run
npm install
from the repository's root directory. - If you've made any changes to the structure of the project, run
npm pack
in each package directory, and validate that the packaged.tgz
files contain everything that will be needed to use the library, but nothing more.README.md
files will always be included.- Make any necessary changes to the
files
property of the incorrect package'spackage.json
file.
- Run
lerna publish
. This command will do the following:- Bump the versions of any packages that have changed since the last git tag, asking which version number should get bumped for each one
- Commit the version bumps and any
package-json.lock
changes - Create a git tag for each package that is being published, and push it to GitHub
- If
lerna publish
failed, see https://lerna.js.org/docs/faq#how-do-i-retry-publishing-if-publish-fails. Make sure to remove anygitHead
fields inpackage.json
files. - Go to https://github.com/REVrobotics/node-rhsplib/tags, select each new tag, and create a new release for each one.
- Name the release
<package name> version <version>
- Write up a description of the changes to that specific package.
- Name the release