Skip to content

angyvolin/gulp-penthouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-penthouse

Gulp plugin for extracting critical path css

A gulp plugin based on Penthouse that extracts critical path css to increase page speed rendering

Up and running

Installation:

npm install gulp-penthouse --save-dev

Example gulp task:

var gulp = require('gulp');
var criticalCss = require('gulp-penthouse');

gulp.task('critical-css', function () {
    return gulp.src('./styles.css')
        .pipe(criticalCss({
            out: 'critical.css',
            url: 'http://localhost:9000',
            width: 1300,
            height: 900,
            strict: true,
            userAgent: 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
        }))
        .pipe(gulp.dest('./dist/css/'));
});

About

Gulp plugin for extracting critical path css

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published