A cool tool that saves you time if you want to remove your
node_modules folder before running the
npm install command.
How does it do it?
By first moving the
node_modules folder to a temporary location (
$TMPDIR) it clears the room to start running
npm install and simultaneously delete the old
node_modules folder while the new modules are being installed.
To install globally run:
npm install -g @itayavra/rmnpm
In the root of your project, simply run
Or (if not installed globally):
[-p | --pull]– will update the code before reinstalling all the packages
[-rl | --remove-lock-file]– removes package-lock.json if exists
--use-lock-file– uses an existing package-lock.js (running
npm ci --prefer-offlineinstead of the
--clear-cache– resets the ‘Total time saved’ data
--quiet– runs without showing any rmnpm logs (will still show the logs from the commands that run)
rmnpm -p -rl