The Roam version of beamcoder only supports binary releases for ease of distribution. Publishing multiple binary distributions of the same package is a bit challenging on NPM, but in the end we decided to go the esbuild route and have multiple packages with just platform-specific binaries, and a main package with just the javascript.
- Update the version number in the appropriate
prebuilds/{platform}/package.json
(TODO: automate this?) - In the root of the repository,
npm run make-prebuilt
- Change directory to the
prebuilds/{platform}
folder and runnpm publish
. - Edit the version number in the main
package.json
- Repeat the above steps on all supported platforms (TODO: support cross-compilation someday?)
npm publish
in the root of the repository
- Make a new folder in
prebuilds
. The folder should be named according to the outputs ofos.platform()
andos.arch()
as reported by node. - Use an existing folder as a template for what files to put inside the
folder. A
package.json
,README.md
stub, andindex.js
stub should all be in there. - Make sure that
npm run build
can produce abuild/Release/beamcoder.node
binary that passes all the tests. - Follow the previous instructions to publish it.