Install the plugin
npm install grunt-penthouse --save-dev
Configure the Grunt task
In your project's Gruntfile, add a section named
penthouse to the data object
See the setup in the Gruntfile for this plugin for an example setup of how one can use
this plugin with the
connect plugin to automatically extract critical css as a step
in an automatic build process.
The resulting css file needs to be embedded in the head of the html files you are serving
to your clients. This can either be done dynamically at runtime
include in your
index.php file), or as a part of your build process -
building it into your html files. One plugin that can help you achieve this is
the grunt-codekit plugin
See its README for an example on how to achieve this.
- v0.1.1 First working release
- v0.1.2 Updated to penthouse version 0.2.5
- v0.2.1 Updated to penthouse version 0.3.0
- v0.3.0 Added
skipErrorsoption. Range version for Penthouse.
- v0.4.0 Grunt 1.0
- v1.0.0 Support for Penthouse 1+