Thursday, 13 August 2020

Is there a way to link node module to git repo?

So basically I have a project A, B and C.C is required by both B and B and B is required by ASo basically if any update happens to C I need to update both B and A. So basically I have git repos of all A,B and C. I made some changes in C but A has dependency on C so to test A I need to apply same changes in A/node_modules/C.Is there a way I can link my node module folder of B and C to git repo I have in the home directory. So if I made any changes then it would reflect there automatically.I tried doing this, I deleted all files in A/node_modules/C and then created a new file A/node_modules/C/index.js and inside this index I have code ::module.exports = require('/home/C');But it does not work. Is there any way to handle this?

Submitted August 13, 2020 at 03:41PM by GhostFoxGod

No comments:

Post a Comment