Skip to content

Instantly share code, notes, and snippets.

@yyx990803
Last active March 5, 2024 01:24
Show Gist options
  • Star 95 You must be signed in to star a gist
  • Fork 15 You must be signed in to fork a gist
  • Save yyx990803/6045243 to your computer and use it in GitHub Desktop.
Save yyx990803/6045243 to your computer and use it in GitHub Desktop.
npm list only top level modules.
alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
@Hibou57
Copy link

Hibou57 commented Apr 24, 2020

Why does the --depth option not appear in npm -h nor npm list -h ? Is this an hidden option?

@skyrpex
Copy link

skyrpex commented Jan 25, 2021

Why does the --depth option not appear in npm -h nor npm list -h ? Is this an hidden option?

I tried looking for it too. I think it's just undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment