Skip to content

Instantly share code, notes, and snippets.

Last active Feb 2, 2022
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 to latest version:
    npm i npm -g

Handy global packages

npm i -g light-server updtr fx npm-check npm-check-updates npm-scripts-tree
  • 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) (built-in now)
  • fx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment