I want to make gulp work with files without extension also. I tried to do it the following ways:
function someTask() {
return gulp.src('./src/**/*.{html,,xml,txt}')
.pipe(gulp.dest('./build'));
}
function someTask() {
return gulp.src('./src/**/*.{html,!*,xml,txt}')
.pipe(gulp.dest('./build'));
}
function someTask() {
return gulp.src('./src/**/*.{html,[^*],xml,txt}')
.pipe(gulp.dest('./build'));
}
but I haven't got any results. Any suggestions?
I am still trying to find a better answer, but one route is to get all the files and then eliminate the extentions you don't want. Like
So here
{js,png}list the possible file extensions in yoursrcdirectories you don't want.Hopefully there is a better answer.
[EDIT]: Maybe there is, try this:
This part
./src/**/!(*\.*)appears to match only files with no.in them, i.e., no extention.