I've pulled down a node module using NPM, and added it to package.json
. However there was a need to change some of the module's code as it didn't meet my requirements 100%.
Typically when I'm working with node and git
I would ignore the node_modules
directory and use npm install
when deploying to a server.
I'm wondering what best practise would be in my scenario, is there a way of defining a module in package.json
that should be ignored if it already exists locally when running npm install
? Is this already the default behaviour for all modules? How would that work if someone ran npm update
? I would assume the latest version of that module would be pulled down and would overwrite my changes?
Alternatively I've thought about forking the original git repo for the module, republishing my fork to NPM and then using that instead.
Tips and ideas would be greatly appreciated :)