Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
added option to only write out files that have unused dependencies #5
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
NOTE: I did not yet document this in
As for why I don't want to overwrite files w/o unused dependences, it's because amdextract modifies the contents of those files (related to the separator issue).
Even if that were fixed, and the contents of the output file were exactly the same as the input file, I'd still prefer not to overwrite source files that don't need it and would be more comfortable using this plugin if there were an option to prevent that. I would imagine others would feel the same way, no?
Before merging, i think the name of the option is a bit confusing:
About documentation you can go for that. I will update