node.js - How to npm install to only save dependency to package.json? -
i'm adding dependencies package.json used part of provisioning process virtual machine. such, don't need install modules locally since provisioner me inside vm. there way following:
npm install --save <module> so only creates dependency latest version of module in package.json without downloading module or creating node_modules folder?
the --dry-run option close, doesn't create node_modules folder doesn't write package.json either.
for now, i'm manually doing following each time need update packages before re-provisioning vm:
rm -rf node_modules other reasons might include being able build package.json file in low-bandwidth situations such tethering, know you'll need module don't want spare bandwidth.
there no way npm i'm aware of.
there 2 npm packages doing this; i've never used either of them, might worth try:
hope helps!
Comments
Post a Comment