How to install dependencies for project without changing working directory to project root?
Curently you need to execute:
cd /my/project/root && npm install && cd -
I'm looking for an option like -C for Makefile so that I can:
npm install -C /my/project/root
Any ideas on how to accomplish this?
A colleague of mine has found a way to do this (note that this is not documented in npm help
but online):
npm install --prefix /my/project/root
Or the short version (only documented online)
npm install -C /my/project/root
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With