Is it possible to change the path of the nodule_modules within a function?
I have a structure in gulpfile.js in which there are different scripts for different tasks: minify, join, optimize, etc.
But there is also a function in which I make a version of the web, in which different portals come out, in which only the CSS changes.
The thing is that now I have to copy the folder node modules in each of the subdirectories and I would like to be able to change its route so that I do not have to do this step that makes me waste a lot of time.
The structure is:
/CarpetaRaiz
/src
/dist
/node_modules
/Versiones
/VersionWeb1
/src (con sus CSS)
/dist
/VersionWeb2
/src (con sus CSS)
/dist
/VersionWeb3
/src (con sus CSS)
/dist
/VersionWeb4
/src (con sus CSS)
/dist
And here comes the problem, since I have to copy the node_modules folder to VersionWebX, there are now 16 versions, imagine the time that is lost by copying that folder 16 times.
Is there a way to optimize the script, taking the path to the original node modules in the "versions" function?
Edit 1
Working on a Windows computer