gulp-zip

Dynamic filename in gulp-zip

风流意气都作罢 提交于 2019-12-12 05:37:30
问题 I try to generate multiple zip files with gulp-zip packages - package-1 - package-2 to build - package-1.zip - package-2.zip At the moment my task looks like this: gulp.task('zip', function () { return gulp.src("packages/*") .pipe(zip("archive.zip")) .pipe(gulp.dest("build")); }); This generates a single zip file names archive.zip which contains my two packages. How to get 2 separate zipfiles? How to pass the folder name to the zip function? 回答1: You can call the zip command twice in your zip