mardi 24 février 2015

Make NPM remove module deleted from package.json, ie reflect the state of package.json

If I remove a dependency in package.json, is there a command I can run to make NPM delete it from the node_modules directory?


I know I can delete it from NPM directly with



npm uninstall <module> --save


But I think it would be easier if I could just remove the line from package.json and run a command and NPM would delete it (and/or install whatever I added to package.json). In other words, I want a command to make my node_modules directory reflect the dependencies I set up in package.json.


Is there any way to do this?


Aucun commentaire:

Enregistrer un commentaire