Last Updated: February 25, 2016
·
7.533K
· Ionut-Cristian Florescu

The "new" npm list --depth=0

A while ago I wrote this post about a quick way to list just the top-level NPM modules, but it's worth saying that due to a recent bug in NPM, --depth=0 doesn't work anymore.

NPM list

Here's a hack you can use in your .bash_profile for the same purpose until they fix the npm command:

npml() {
  npm list $@ | grep ^[├└]
}

alias npml=npml

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside