pmq20/node-packer

Support for library only projects?

ptusch opened this issue · 3 comments

Good day,

I was wondering if you are planning to add support for "library only" modules and let them be included using the bindings modules or similar ones.

This would a pretty cool feature for anyone who is planning to deploy his library without any direct executable code.

What are you thoughts?

pmq20 commented

Very good idea. My thinking is that we can compile your library into a binary form, allowing the user to require one single module and fetch all functionalities of the original library, while libsquash glues the internal require's together in the back scene.

One restriction is that your library must only have exactly one entrance. Impossible to require your_library/a first then your_library/b.

I think that is a fair restriction since assumptions to the internal structure of a package seem rather untidy.