2017-04-05 18 views
0

當我嘗試從bootstrap & font-awesome複製字體在我的bower_components文件夾中時,我得到如下文件夾結構。但我想在我的dist/fonts文件夾中包含所有字體。我究竟做錯了什麼?使用gulp從bower_components複製字體

咕嘟咕嘟任務:

gulp.task('copy:bower-fonts', function() { 
    gulp.src(yeoman.app + '/bower_components/**/fonts/*.*') 
    .pipe(gulp.dest(yeoman.dist + '/fonts')); 
}); 

當前視圖:

enter image description here

回答

0

解決了這個問題,使用gulp-copy。以下代碼:

gulp.task('copy:bower-fonts', function() { 
    gulp.src(yeoman.app + '/bower_components/**/fonts/*.*') 
    .pipe(copy(yeoman.dist, { prefix: 3 })) 
}); 

P.S.不要忘記注射任務:var copy = require('gulp-copy');

相關問題