Deleting files in a gulp task
问题 I have a gulp task in which I want to take some source files and copy them to build/premium and build/free and then remove some extra files from build/free . My attempt at that was doing this: gulp.task("build", ["clean"], function () { gulp.src(["src/*", "!src/composer.*", "LICENSE"]) .pipe(gulp.dest("build/premium")) .pipe(del(["build/free/plugins/*", "!build/free/plugins/index.php"])) .pipe(gulp.dest("build/free")); }); Which results in an error: TypeError: dest.on is not a function at