我使用的是gulp,我很困惑,在构建之后,我的所有路径都是错误的。
例如:
SRC :
pages -> home.html, buy.html (src="../assets/img/test/test.png" used to get all images)
partials -> navigation.html, footer.html
assets -> js,scss,img folders
layouts -> layout.html
在建筑物后:
DIST :
assets -> js,css,img folders
home.html (with ../assets.... url's) - dont work, wrong path
buy.html (with ../assets.... url's) - dont work, wrong path
'use strict'
var gulp = require('gulp')
var fontmin = require('gulp-fontmin')
// ...
gulp.task('fonts:parent', function () {
return gulp.src('./builder/site/parent/fonts/**/*.ttf')
.pipe(fontmin())
.pipe(gulp.dest('./final/frame/themes/gate/assets/fonts'))
});
// Watch
gulp.task('gulp:watch', [
'fonts:parent',
], function() {
gulp.watch('./builder/site/parent/fonts/**/*.ttf', ['fonts:parent'])
});
gulp.task('default', ['gulp:watch'])
/ test.png与/*.png仅检查test.png而不是全部图像。