Open kang-lyk opened 7 years ago
I user ‘gulp-filter ’
gulp.task('css', function() { let plugins = [ autoprefixer(postcssConfig.autoprefixer) ], filterCss = filter('**/*.css', {restore: true}); gulp .src([ 'rev/{css,images}/*.json', 'src/**/*.css', '!src/**/_*.css' ]) .pipe(filterCss) .pipe(postcss(plugins)) .pipe(sourcemaps.init({loadMaps: true})) .pipe(rev()) .pipe(sourcemaps.write('./')) .pipe(filterCss.restore) .pipe(revCollector({ replaceReved: true })) .pipe(gulp.dest('dist')) .pipe(rev.manifest()) .pipe(gulp.dest('rev/css')); });
Images is OK,
.logo { width: 388px; height: 120px; background: #fff url(images/logo.png) 0 0 no-repeat; } ////﹀﹀﹀﹀﹀﹀ .logo { width: 388px; height: 120px; background: #fff url(images/logo-4761c15022.png) 0 0 no-repeat; }
But @font-face not work
@font-face {font-family: "iconfont"; src: url('fonts/iconfont.eot?t=1505980166163'); /* IE9*/ src: url('fonts/iconfont.eot?t=1505980166163#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('fonts/iconfont.ttf?t=1505980166163') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ url('fonts/iconfont.svg?t=1505980166163#iconfont') format('svg'); /* iOS 4.1- */ }
Your file suffix for fonts placed in query part of link? Not in filename suffix? Can You write Your work manifest file content?
I user ‘gulp-filter ’
Images is OK,
But @font-face not work