Skip to content

Instantly share code, notes, and snippets.

View romanbloeth's full-sized avatar

Roman Blöth romanbloeth

  • Lesara GmbH
  • Berlin, germany
View GitHub Profile
@cowboy
cowboy / deps.js
Created March 1, 2013 19:52
Grunt: Test that package.json dependencies were installed correctly.
grunt.registerTask('deps', 'Test that package.json dependencies were installed correctly.', function() {
var pkg = grunt.file.readJSON('package.json');
var total = 0;
['dependencies', 'devDependencies'].forEach(function(key) {
var deps = pkg[key];
if (!deps) { return; }
grunt.verbose.subhead(key);
Object.keys(deps).forEach(function(name) {
total++;