Skip to content

Instantly share code, notes, and snippets.

@kolodny
Created November 12, 2015 21:01
Show Gist options
  • Save kolodny/3706622e74c2e4c797dd to your computer and use it in GitHub Desktop.
Save kolodny/3706622e74c2e4c797dd to your computer and use it in GitHub Desktop.
Find all used dependancies in project
#!/bin/bash
REGEX=$(node -e 'var pkg = require("./package");console.log(Object.keys(pkg.devDependencies).concat(Object.keys(pkg.dependencies)).join("\\|"))')
grep -iH "'$REGEX'" `find . -name "*.js" | grep -v 'node_modules\|bundle'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment