Useful NPM global packages

April 07, 2019

When it’s a package that I’ll use infrequently, such as create-react-app, I’ll reach to npx. However, there’s a few packages I use again and again so are worth the npm i -g.

npm-check

npm i -g npm-check
npm-check -u
npm-check -ug

Check for outdated, incorrect and unused dependencies. The -u arg gives you an interactive tool.

typescript

npm i -g typescript
tsc my-file.ts

Typescript compiler.

fkill

npm i -g fkill-cli
fkill

Cross-platform process killer with an interactive UI.

http-server

npm install http-server -g
http-server [path]

Quickly serve a directory through localhost:8080 with zero-config.

netlify-cli

npm i -g netlify-cli
netlify deploy

Deploy a site to Netlify from the command line. I’ll use this to throw up temporary site when I need to demo work in progress to team mates.

rimraf

npm i -g rimraf
rimraf [path]

It’s rm -rf but works where ever you have node - macOS, Windows, WSL, node.

tinypng-cli

npm install -g tinypng-cli
tinypng myimage.jpg

You’ve used the website, now use the cli!


Duncan McDougall

Duncan McDougall is contract web developer from Annan, Scotland.
Twitter LinkedIn GitHub