cryptlex / lexactivator-js

LexActivator API wrapper for Node.js (licensing library)
https://cryptlex.com
MIT License
15 stars 5 forks source link

Can't use with PKG - conflict with documentation #10

Closed JacobWrenn closed 4 years ago

JacobWrenn commented 4 years ago

The docs over at https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-node.js say:

In order to package your Node.js project into an executable, check out pkg project.

However, this clearly isn't possible as PKG does not allow .node files like those used by lexactivator to be compiled into the binary.

Did this used to be available on an older version or do you have a custom solution?

adnan-kamili commented 4 years ago

Hi Jacob,

You need to ship the .node files along with your exe/binary file. This is how it works in the case of pkg.

JacobWrenn commented 4 years ago

Thanks Adnan. Do you have any advice on extracting the .node files out of node_modules so that they can be shipped? For example in a CI/CD situation

JacobWrenn commented 4 years ago

I only ask because pkg does not provide a guide on how to achieve this but your documentation implies it is simple to use your software with pkg

adnan-kamili commented 4 years ago

After npm i just invoke the following command:

cp -a node_modules/@cryptlex/lexactivator/lib/binding/**/ ./

JacobWrenn commented 4 years ago

Brilliant, thanks!