How does gulp.src exclude directories? pay attention to not even folders.

gulp.task("deal", function() {
    return gulp.src([
        "src/**/*",
        `!src/template/**`
    ])
    .pipe(gulp.dest("dist"));
});

the above statement ignores all files in the "template" folder, but not the template folder. That is, after the gulp has finished running, there is still an empty folder "template" in the "dist" folder. Is there any way not to even want this folder?

Mar.04,2021

gulp.src([
        'src/**/*',
        `!src/template/**`
    ], {
        nodir: true
    })
Menu