Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcfedr/gulp-unused-images
Attempts to list images that are not used
https://github.com/mcfedr/gulp-unused-images
Last synced: 2 months ago
JSON representation
Attempts to list images that are not used
- Host: GitHub
- URL: https://github.com/mcfedr/gulp-unused-images
- Owner: mcfedr
- License: mit
- Created: 2015-06-18T09:07:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-03T11:15:16.000Z (about 8 years ago)
- Last Synced: 2024-10-11T13:13:23.489Z (3 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unused Images
Attempts to list all the images that are not referenced in your html and css.
Images are match by filename only. This is because its likely that the 'filesystem' that a browser will see is very
different from the one that gulp sees.Images with absolute urls will also be ignored.
## Usage
Stream all the images, css and html files that you have into it, it emits errors, so use plumber to catch and see them
gulp.task('images:filter', function () {
return gulp.src(['app/images/**/*', '.tmp/styles/**/*.css', 'app/*.html', 'app/partials/**/*.html'])
.pipe(plumber())
.pipe(unusedImages())
.pipe(plumber.stop());
});
## Options### options.log
* Type: `Boolean`
* Default: `true`Whether to emit errors for unused images
## OutputThe output lists the images that it found no references to and any ng-src attributes that it saw, allowing you to try and decided what that would refer to
Error: Unused images: arrow_grey_right.png, bg-circel-not-empty-small.png
ng-src: {{ app.iconUrl || 'images/generic_android_icon.png' }}