Skip to content

Instantly share code, notes, and snippets.

@brenopolanski
Created November 1, 2016 19:34
Show Gist options
  • Save brenopolanski/4aec3240bf30889576f9badd2e745fc3 to your computer and use it in GitHub Desktop.
Save brenopolanski/4aec3240bf30889576f9badd2e745fc3 to your computer and use it in GitHub Desktop.
Listing globally installed NPM packages and version
npm list -g --depth=0
@YuilTripathee
Copy link

why is --depth=0 necessary?

@eschie
Copy link

eschie commented Oct 19, 2017

@YuilTripathee otherwise you will get a list of all global package dependencies.

@drdhruti315
Copy link

What is the significance of the + and ' symbols

@jpdevspace
Copy link

--depth=0 or --depth 0 is necessary so that it only shows you the global package and not their dependencies.

@andreipaz
Copy link

What is the significance of the + and ` symbols? (2)

@cristianofromagio
Copy link

@drdhruti315 @andreipaz If you are talking about this:
image
The plus signs are from git and represent a line addition (and displayed green) while a line deletion is a minus sign and displayed red. The ``` are from markdown and used to highlight a code block.

@cortesa
Copy link

cortesa commented Mar 2, 2019

why is --depth=0 necessary?

with it, it also shows all the dependencies tree
try to do it without this... it shows only first braches on the tree (installed package names)

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