npm update -g
updates all global packages and their dependencies, see npm/npm#6247.
Use the scripts provided here.
Unix scripts are forked from https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.
npm update -g
updates all global packages and their dependencies, see npm/npm#6247.
Use the scripts provided here.
Unix scripts are forked from https://gist.github.com/othiym23/4ac31155da23962afd0e. See the discussion there.
@echo off | |
setlocal enableextensions enabledelayedexpansion | |
set packages= | |
for /f "usebackq delims=: tokens=3" %%f in (`npm -g outdated --parseable --depth=0 -q`) do set packages=!packages! %%f | |
:: Note: on windows, the first : separates drive in package path. | |
call npm install -g%packages% | |
exit /b %errorlevel% |
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 -q | cut -d: -f2) | |
do | |
npm -g install "$package" | |
done |