Reputation: 782
I have 3 projects in a bitbucket repo: projectA, projectB and projectCommon. Last one, projectCommon should be used in ProjectA and ProjectB and it has been structured as node module which it is not public (not published to npm directory).
How can I use ProjectCommon module in ProjectA and ProjectB? I've tried using doing npm link but I'm not very convinced in using this in a production environment. Is there a better way for doing it? Maybe should I remove projectCommon from the repo and add it in a new repo? ¿How the package.json must be configured?
Upvotes: 0
Views: 219
Reputation: 9798
Add it as a dependency, e.g.
"dependencies" : {
"Your_Module": "https://bitbucket.org/:username/:projectname/get/master.tar.gz"
}
After which you hit npm install
Upvotes: 1