mehdishojaei/grunt-amdcheck — pull request #5 by tomwayson (2014-04-17 19:24:44+00:00)
Title: added option to only write out files that have unused dependencies

In my workflow, when using the removeUnusedDependencies option, I only want to write out the files that have unused dependencies. This is because I use this plugin as more of a one-time or periodic check for unused dependencies, and when I find them, I want to remove them from the source files (instead of removing them each time I do a build). I do this by configuring this plugin to write the files to a temp directory and then copying the output files back over my source files. However, I don't want to overwrite any files that do not have unused dependencies, so I added an option to check for that before writing the files out.

By default, the option is set to false, so if you don't explicitly include it in your task configuration, the default behavior (write out all files) will be applied. To only write out files w/ unused dependencies, set `onlyFilesWithUnusedDependencies: true` as follows:

```
options: {
// logUnusedDependencyNames: true,
removeUnusedDependencies: true,
excepts: ['module'],
exceptsPaths: ['require', /^jquery\./],
onlyFilesWithUnusedDependencies: true
},

```
**NOTE:** I did not yet document this in `README.md`. If you want to merge this, I can do that. Also, I did not update `package.json` version info.