show-required.sh 297 B

123456789101112131415
  1. #!/bin/sh
  2. # Part of Zombie Navigator
  3. # Copyright © 2015 Zombie Navigator Developers
  4. dir="`dirname "$0"`"
  5. cd "$dir"
  6. find src/ -name '*.js' -exec sh -c "printf '\n%s: \n' "'"$1"'" ; grep 'require(' "'"$1"'" | sed 's/^.*require(\([^)]*\)).*$/\1/' | sort | uniq" -- {} \;
  7. # vim: ts=4 noet ai