Skip to content

Instantly share code, notes, and snippets.



Last active May 29, 2020
What would you like to do?
My npm setup, and useful global packages

(See also commands for Node.js development and debugging)

Useful commands

  • See all installed global packages:
    npm ls -g --depth=0
  • Update npm itself:
    npm i npm -g

Handy global packages

  • light-server (simple web server with live reload).
    Use it with a script such as:
    "watch": "light-server -s . -w '* # # reload'"
  • updtr (update all deps, conditional on checks passing).
    updtr --to latest -s caret -t 'npm t && whaveter && stuff'
  • Either npm-check-updates or npm-check (check for unused/old deps, and optionally update them too).
  • npm-merge-driver (Git merge driver to automatically solve conflicts in package-lock.json files).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment