-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
The lastRun() api docs contain an error. Under usage, it provides the following recipe:
const { src, dest, lastRun, watch } = require('gulp');
const imagemin = require('gulp-imagemin');
function images() {
return src('src/images/**/*.jpg', { since: lastRun(images) })
.pipe(imagemin())
.pipe(dest('build/img/'));
}
function watch() {
watch('src/images/**/*.jpg', images);
}
exports.watch = watch;However, running this gives a SyntaxError: Identifier 'watch' has already been declared. You can't name the function watch, since watch is already declared as the gulp command in de destructuring assignment.
Metadata
Metadata
Assignees
Labels
No labels