Created
September 19, 2014 11:54
-
-
Save tjFogarty/15ebb77552f782387f73 to your computer and use it in GitHub Desktop.
Penthouse - gulp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var penthouse = require('penthouse'); | |
var fs = require('fs'); | |
var cleanCSS = require('clean-css'); | |
gulp.task('penthouse', ['styles'], function () { | |
penthouse({ | |
url: ['http://chadwicks.dev'], | |
css: 'assets/css/application.css', | |
width: 480, | |
height: 800 | |
}, function (err, critical) { | |
var clean = new cleanCSS().minify(critical); | |
fs.writeFile('admin/templates/default_site/layouts.group/critical.html', '<style>' + clean + '</style>'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment