Skip to content

Instantly share code, notes, and snippets.

@thibaultcha
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save thibaultcha/41195da6a9781a7a9b48 to your computer and use it in GitHub Desktop.

Select an option

Save thibaultcha/41195da6a9781a7a9b48 to your computer and use it in GitHub Desktop.
List npm dependencies without all the shit

Improved version of nicholascloud/top-level-npm-pkgs.md

function npmls() {
  npm ls "$@" | grep "^├─┬" | sed 's/├─┬ //g'
}

Gets you:

~|⇒ npmls -g
bower@1.3.9
coffee-script@1.8.0
equiprose@1.1.1
finch@0.1.1
grunt@0.4.5
grunt-cli@0.1.13
gulp@3.8.7
harp@0.13.0
hubot@2.8.1
npm@1.4.24
npm-check-updates@1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment