Reputation: 201
I have a beginner question concerning nodejs. I'm working on two different nodejs projects, let's say project A and project B. And I would like to use the functionalities of project A in B.
How can I do it??
I was thinking about using git submodules. But is there a possibility to use project A as a node_module. that means that the users only have to update it if a new version of it is available?
Thank you
Upvotes: 0
Views: 2194
Reputation: 7547
No need to use git submodules - you can use npm
to install a module directly from a git remote url, or directly from GitHub.
e.g.:
npm install <git remote url>
npm install githubname/reponame
See the npm install docs for details.
Upvotes: 4