For nodejs what are best design practices for native modules which share dependencies?
Posted
by
Mark Essel
on Programmers
See other posts from Programmers
or by Mark Essel
Published on 2012-06-14T09:43:54Z
Indexed on
2012/06/26
3:24 UTC
Read the original article
Hit count: 161
Hypothetical situation, I have 3 node modules all native, A, B, and C.
- A is a utilities module which exposes several functions to javascript through the node interface, in addition it declares/defines a rich set of native structures and functions
- B is a module which is dependent on data structures and source in A, it exposes some functions to javascript, in addition it declares/defines native structures and functions
- C is a module which is dependent on data structures and source in A & B, it exploses some functions to javascript, in addition it declares/defines native structures and functions
So far when setting up these modules I have a preinstall script to install other dependent includes, but in order to access all of another modules source what is the best way to link to it's share library object (*.node) ?
Is there an alternative best practice for native modules (such as installing all source from other modules before building that single module)? Reply
© Programmers or respective owner