Answer the question
In order to leave comments, you need to log in
How to correctly sort by prefix at the beginning of the file name?
There is a task in your gulp template to sort pictures depending on the prefix. For example, within the same folder there is a picture img.png and w-img.png and it is necessary that img.png be transferred to one folder during assembly, and w-img.png to another. So far, I've done what would work when the prefix at the end is like this "*+(-w).+*"
img: ['src/assets/img/**/*.+(jpg|jpeg|png|svg|gif|ico|JPG|JPEG|PNG|SVG|GIF|ICO)',
'!src/assets/img/**/*+(-w).+(jpg|jpeg|png|svg|gif|ico|JPG|JPEG|PNG|SVG|GIF|ICO)',],
imgTrash: ['src/assets/img/**/*+(-w).+(jpg|jpeg|png|svg|gif|ico|JPG|JPEG|PNG|SVG|GIF|ICO)'],
img: ['src/assets/img/**/*.+(jpg|jpeg|png|svg|gif|ico|JPG|JPEG|PNG|SVG|GIF|ICO)',
'!src/assets/img/**/(w-)+*.+(jpg|jpeg|png|svg|gif|ico|JPG|JPEG|PNG|SVG|GIF|ICO)',],
imgTrash: ['src/assets/img/**/(w-)+*.+(jpg|jpeg|png|svg|gif|ico|JPG|JPEG|PNG|SVG|GIF|ICO)'],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question