sseeeedd
sseeeedd copied to clipboard
Critical CSS
Here is an oldish critical task:
/**
* @section Build
* Inline critical CSS
*/
gulp.task('critical', ['build'], function () {
return gulp.src(paths.dest + '*.html')
.pipe(critical({
base: paths.dest,
inline: true,
minify: true,
css: paths.dest + 'css/styles.min.css'
}))
.on('error', function(err) {
gutil.log(gutil.colors.red(err.message));
})
.pipe(gulp.dest(paths.dest));
});
There might be a better package or way out there, now.