Closed markgoodyear closed 10 years ago
See #4. Although it might be appropriate to add a section in the readme for use cases such as adding a filesize reporter into the build chain.
I could use that, although I'm not after logging the file-size. This is to just log the filename of changed files—similar to gulp-imagemin. No worries if you'd prefer to let gulp-bytediff handle it. :)
OK, that's fine. If you want to log the file paths that were changed you could always use something like the following:
var gulp = require('gulp');
var gutil = require('gulp-util');
var svgmin = require('gulp-svgmin');
var map = require('map-stream');
gulp.task('icons', function() {
return gulp.src(['./icons/*.svg'])
.pipe(map(function(file, cb) {
gutil.log(file.path);
cb(null, file);
}))
.pipe(svgmin())
.pipe(gulp.dest('out'));
});
Personally I like the style of gulp modules just doing one thing, in this case I feel that other plugins should handle things like reporting the file paths picked up by a glob. That way you have a generic solution that can be implemented in your build, regardless of whether the plugin author chose to add one into their plugin or not.
Thanks for the example Ben, I was having trouble figuring something like that out.
You're welcome. :-)
I find it handy to see what files have been minified, especially when using a caching plugin.