Let’s say I’m using a frequently used and updated module (such as Connect) with nodeJS, and that I’ve installed said module to the local directory I’m working in using NPM. If I modify one of the scripts within the module to act differently in a way that makes sense for my server, what will happen when I run npm update in the future if there’s a change to the file that I changed in the master edition? Would it be a better idea to just copy the script into another file that I then modify (instead of the original script) and use said modified file instead? Would anything happen if said modified file is still within the node_modules directory?
Best, and thanks,
Sami
npm will overwrite your changes. Without asking or anything. If you want to use modified packages, use a git uri as version inside your package.json.