I'm trying to figure out how to address this issue:
My goal is to transfer all fonts from bower_components to .tmp/assets/fonts. However, the complication arises with some fonts being .svg files. If I were to use the following code in a typical manner:
gulp.task('copyBowerFonts', function(){
return gulp.src("bower_components/**/*.{ttf,woff,eof,svg}")
.pipe(gulp.dest(paths.tmpFonts));
});
...this would result in copying both font and image files with .svg extension to the .tmp/assets/fonts directory. Ideally, I'd like a solution where all font files within any folder under 'fonts/' are copied to the specified location.
To achieve this, I plan to utilize gulp-flatten to copy files without maintaining their original folder structure.
So, my question is: is there an alternate method or how can we modify the approach to accomplish this?:
gulp.src("bower_components/**/fonts/*.{ttf,woff,eof,svg}"
I believe the solution may be straightforward, yet I haven't been able to find it thus far.
Thank you for your assistance! :)