Skip to content

Instantly share code, notes, and snippets.

@erikzaadi
Forked from shaharke/outdated.js
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikzaadi/9863420 to your computer and use it in GitHub Desktop.
Save erikzaadi/9863420 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var npm = require('npm');
npm.load('./package.json', function () {
npm.outdated(function (err, outdated) {
if (outdated.length > 0) {
outdated.forEach(function (p) {
console.log(p[1] + '\t' + p[2] + ' => ' + p[3]);
});
process.exit(1);
} else {
process.exit(0);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment