-
gulp-inline-style能够将链接样式标签替换为内联样式标签,从而节省http请
资源介绍
gulp-inline样式
用内联样式标签替换链接标签以保存http请求
如何使用
var gulp = require('gulp');
var inlineStyle = require('gulp-inline-style');
var paths = {
html: 'src/html/*.htm'
};
//final step: replace linkStyle using style tag containing CSS content in build dir.
gulp.task('final', function() {
return gulp.src(paths.html)
.pipe(inlineStyle('build/css/'))
.pipe(gulp.dest('build/html'));
});