Checks which modules you have used in your code and then makes sure they are listed as dependencies in your package.json and vice-versa, using
dependency-check
Issues with the output should be reported on the dependency-check
issue tracker.
$ npm install --save-dev grunt-dependency-check
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks
grunt.initConfig({
dependencyCheck: {
files: ['**/*.js'], // same as --entry
options: {
package: '.', // module folder path
missing: true, // same as --missing
unused: true, // same as --unused
excludeUnusedDev: false, // same as --no-dev
ignoreUnused: [], // same as --ignore-module
noDefaultEntries: true // same as --no-default-entries
}
}
});
grunt.registerTask('default', ['dependencyCheck']);
See the dependency-check
docs.
In addition you can supply a package
option.
MIT © Sindre Sorhus