A Grunt task to check for unused files (jpg, png, css, js etc) in a project files and output them to the console.
If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:
npm install grunt-unused --save-dev
Tip: the load-grunt-tasks module makes it easier to load multiple grunt tasks.
See the Gruntfile in this repo for a full example.
A reference to the directory of files that are being checked if they are referenced in other project files.
An array of directories that contain files that reference files in the reference directory.
The ability to automatically delete unused file reference from project.
If remove is set to true and days has a value files will only delete if the file hasn't been modified after the length of days.
Output unused files to a file. Set to false to disable
Allows the Grunt task to fail when unused files are found.
- 0.2.3: Merge pull request #8
- 0.2.2: Merge pull request #6 and #7
- 0.2.1: Merge pull request #5
- 0.1.9: Add jshint and jsonlint tests.
- 0.1.8: Add development dependencies.
- 0.1.7: add release history notes to documentation.
- 0.1.6: add the ability to only delete files after modified date.
- 0.1.5 updates to documentation.
- 0.1.4: add the option to automatically delete unused files from project.
- 0.1.3: updates to documentation.
- 0.1.2: clean up code.
- 0.1.1: fix #1 by replace
- 0.1.0: Initial release.
- Fork it
- Run Grunt watch
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am "Add some feature")
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
MIT © Ryan Burgess