Skip to content

Instantly share code, notes, and snippets.

@zyla
Created May 20, 2018 07:22
Show Gist options
  • Save zyla/040420bb5ddf7f51b8a3648bba099e54 to your computer and use it in GitHub Desktop.
Save zyla/040420bb5ddf7f51b8a3648bba099e54 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Try to `bower info` all dependencies and print out the ones which failed.
set -e
node -e '
var package = require("./bower.json");
dump(package.dependencies);
dump(package.devDependencies);
function dump(deps) {
for(var key of Object.keys(deps)) {
var version = deps[key];
var specifier;
if(/^#/.exec(version)) {
specifier = key + version;
} else {
specified = version;
}
console.log(specifier);
}
}
' | while read pkg; do bower info $pkg >/dev/null 2>&1 || { echo "FAILED: $pkg"; }; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment