I'm trying to speed up a continuous integration stage. Currently, it spends about 5 minutes installing unneeded NPM packages, then 30 seconds running the stage.
I was hoping to speed it up by replacing the step npm install
with npm install package1 package2
etc, only installing the necessary packages for that step.
However, NPM reads the package.json file and trys to install all packages anyways. Is there any way to get NPM to ignore package.json, and simply locally install a few packages?