Replies: 1 comment
-
Publish all platform binaries together is too huge; independent platform packages can reduce download size during installation |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
This is my first time use napi to publish to npm. however, I am a little bit confused on the current CI steps. Please correct me if I am wrong:
It seems in CI.yml the following steps downloads artifacts (.node files) to folder
artifacts
and later move them tonpm
folder:Then when publishing, the
.npmignore
file actually ignored all*.node
files. The actual.node
files were instead published individually into npm with the same version number. (Is this the reason the document recommend creating a name scope?)Then in the generated
index.js
file, it checks the platform, and require the corresponding.node
file. It searches two locations:My question is: why not simply copy the artifacts to the project folder, and publish them together with the package itself? The index.js will have no problem to load them, and it does not have any complexity of separated published packages.
Beta Was this translation helpful? Give feedback.
All reactions