Slide 43
Slide 43 text
@onishiweb
gulp.task('critical', function () {
penthouse({
url : 'http://localhost:8000/index.html',
css : 'public/styles.css',
width : 720, // viewport width
height : 500 // viewport height
}, function(err, criticalCss) {
if (err) {
// handle error
console.log('error', err);
}
fs.writeFileSync('public/critical.css', criticalCss);
});
});