Closed rdehnhardt closed 5 years ago
I try this and works
new elixir.Task('imagemin', function () {
var paths = new elixir.GulpPaths()
.src(config.images.folder)
.output(config.images.outputFolder);
return gulp.src(paths.src.path)
.pipe(changed(paths.output.path))
.pipe(imagemin(options))
.on('error', function(e) {
new elixir.Notification().error(e, 'ImageMin Failed!');
this.emit('end');
})
.pipe(gulp.dest(paths.output.path))
.pipe(new elixir.Notification('ImageMin Complete!'))
}).watch(
[
config.images.folder + '/**/*.jpg',
config.images.folder + '/**/*.jpeg',
config.images.folder + '/**/*.svg',
config.images.folder + '/**/*.gif',
config.images.folder + '/**/*.png'
]
);
// Config
// Debug
// Result
How can I fix this?