node.js - Strategies for maintaining dependencies across multiple node modules in separate repos -


I have a situation that is described in fact, I'm developing 2 node modules, A < / Code> and B , where A depends on B .

For Local Dev I add both projects and lever npm link at global level then by adding npm link B / Code> cloning node_modules . Now any change in B is automatically used by A .

However, the problem is that sometimes forgetting the npm link while doing local development, and installing the latest official release of B I conclude . Often, it only has to work since the B , sometimes not very significant, but sometimes it fails in a subtle way and we get invalid bug reports and confusing developers Are there.

How do I configure a for my package.json , such as using devs to the latest B Are they forced to clone A ?

After making a release, there is an idea to counter the version number of B, and then it is necessary, which can not be established with NPM. Although this can work, it means that you will have to come up with arbitrary version numbers for the tasks not working on the master, and still do not forget to update devs for the latest, etc. Stops.

Are there strategies / conventions that others are using to help in such setup? Do you set dependency on GIT URL? Do you use NPM hooks?


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -