문제

I need to copy a Node.JS project to a computer that will not be connected to the internet. Yes, I know that NPM can create a TarBall, but that is really not appropriate here:

  1. It is a windows box
  2. It has limited storage

I was wondering if I could just do a recursive copy of all the .js files in node_modules [NOTE, my node project is very clean, it does not include any .dll or native system access stuff]

E.g.

robocopy $source/node_modules $dest/node_modules /S /NFL /TEE /LOG:watson.log /MT:16 *.js *.json *.types

which uses 16 threads in RoboCopy to do a full tree copy

#robocopy swtiches /S = subdirs, /ETA = estimates, /NFL = don't list files, /MT = number of parallel tasks, /TEE show log on console
#robocopy switches /xd directory exclude /xf file exclude
도움이 되었습니까?

해결책

I found this is working for me. But then, I did not need any fancy dependencies (e.g. DLL files). Works fine at removing lots of stuff in the packages I do not need.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top