0
任務不工作:咕嘟咕嘟 - 保存不同的文件,以不同的路徑如預期
gulp.task('css', function() {
return gulp.src([
'node_modules/bootstrap/dist/css/bootstrap.min.css'
])
.pipe(gulp.dest('public/assets/css'))
.pipe(gulp.src(['node_modules/bootstrap/dist/fonts/*']))
.pipe(gulp.dest('public/assets/fonts'))
});
預計產出將是
- assets/css
> bootstrap.min.css
- assets/fonts
> glyphicons-halflings-regular.eot
> glyphicons-halflings-regular.svg
> glyphicons-halflings-regular.ttf
> glyphicons-halflings-regular.woff
> glyphicons-halflings-regular.woff2
而是我所得到的是
- assets/css
> bootstrap.min.css
- assets/fonts
> bootstrap.min.css
> glyphicons-halflings-regular.eot
> glyphicons-halflings-regular.svg
注意
- 引導CSS複製到Fonts目錄下,同時它不應該
- 不是所有的字體被複制
這有什麼錯我的任務是什麼?
您的代碼不解決,因爲你設置的字體DST之前返回。但是,你的鏈接確實是合適的解決方案。也許編輯你的答案? – brazorf
@brazorf你確定嗎?這個版本幾乎解決了這個問題。我附上我的測試腳本和結果。我正在使用gulp-3.9.0 – karthick