Answer the question
In order to leave comments, you need to log in
How to specify the path to any folder in Gulp?
function images() {
return src(
[
'src/img/**/*.{jpg,jpeg,png,gif,svg}',
'src/blocks/**/img/*.{jpg,jpeg,png,gif,svg}'
])
.pipe(dest('dist/img'));
'src/blocks/**/img/*.{jpg,jpeg,png,gif,svg}'
- this is picked up, but takes all subfolders with it , only pictures in the corresponding folder are needed
Answer the question
In order to leave comments, you need to log in
.pipe(rename({
dirname: "/",
}))
.pipe(dest('dist/img'));
src/img/icons
, then it will not be picked up, the source folder will be img , not img/icons
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question