Closed lydell closed 1 year ago
Thank you! I'll fix clippy in main and merge it here. Then I'll review this and try the steps. If all is well I'll merge this.
Is this npm package also usable for global installs?
I'll fix clippy in main and merge it here.
Thanks! Feel free to make whatever changes you like.
Is this npm package also usable for global installs?
Yes!
For versioning, can I use rev numbers like "3.0.0-rev1" just in case I have to update the npm package? I don't know how versioning is handled by npm. Is this going to be installed if people just do npm install elm-test-rs@3.0.0
? What versioning scheme would you advise?
You can read all about the versioning here: https://github.com/elm/compiler/pull/2287/files#diff-cd34b117c7124e742fd6eb9ffd8f6f9f5c125402a66e9e62c906785b940f7681R68-R85
This adds a light-weight npm package based on https://github.com/elm/compiler/pull/2287
Here’s how to publish (maybe you want to put this somewhere):
Repeat this for all the binary packages in
packages/
. This usespackages/elm-test-rs-darwin-x64
as an example.cd packages/elm-test-rs-darwin-x64
./elm-test-rs
. For Windows:./elm-test-rs.exe
file elm-test-rs
ls -l elm-test-rs
package.json
of the binary package, bump the version for example to"3.0.1"
.In
package.json
of the main npm package, update"optionalDependencies"
to point to the bumped version. For example:"@mpizenberg/elm-test-rs-darwin-x64": "3.0.1"
.Note: Pin the versions of the binary packages exactly – no version ranges. This means that installing
elm-test-rs@3.0.1
installs the exact same bytes in two years as today.Publish the package:
npm publish --access=public
--access=public
is needed because scoped packages are private by default.Then publish the main npm package by running
npm publish
in thenpm/
folder.