Ignore invalid modules

This commit is contained in:
Kevin Sawicki 2015-02-10 18:54:29 -08:00
parent 637c53dbb4
commit 3d15810b1b

View File

@ -9,6 +9,8 @@ module.exports = (grunt) ->
return if fileName isnt 'package.json'
{name, version} = grunt.file.readJSON(absolutePath)
return unless name and version
modules[name] ?= {versions: {}, count: 0}
modules[name].count++
modules[name].versions[version] = true