I am struggling with the following piece of code:
gulp.src('src/*.*')
.pipe(filter(['**', '!**/*.{png,jpg,bmp,jpeg,jpeg2,webp,svg}', '!**/*.{css,less}']))
.pipe(gulp.dest('dev/'));
This code is supposed to move any files that are not images or styles. However, it seems to filter every file in the directory. For instance, it only moves src/index.php
, src/script.js
, or src/page.html
, but it filters out src/assets/script.js
.
I have tried using one or no asterisks (which should filter everything) and also attempted using only one filter instead of two.
I find this behavior of the plugin strange. How can I correctly utilize it?