Created
July 1, 2014 10:31
-
-
Save apaleslimghost/a9d2d3616bffeb4d738a to your computer and use it in GitHub Desktop.
Find out which modules have no dependents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
readonly files="path/to/scripts/entry.js" | |
readonly base="path/to/scripts" | |
readonly opts="-t whatever" | |
list_deps() { | |
local entries=$1 | |
local opts=$2 | |
browserify $opts --list $entries \ | |
| sed "s:$(pwd)::" \ | |
| grep $base \ | |
| sort \ | |
| uniq | |
} | |
list_files() { | |
find $base -type f \ | |
| sort | |
} | |
main() { | |
diff =(list_deps "$files" "$opts") =(list_files) | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment