Commit 706dc74f by Kevin Van Ransbeeck

Documentation added to gruntfile

1 parent 1cc8a338
...@@ -90,6 +90,15 @@ module.exports = function(grunt) { ...@@ -90,6 +90,15 @@ module.exports = function(grunt) {
} }
}, },
/** @TODO: PNG fallback for IE */
/**
* 7 :: Run PHP through parser to create static HTML
* (needed to include our critical css automatically).
* This is not possible on most dynamic sites.
* Search for alternative or extract critical CSS manually...
*/
php2html: { php2html: {
default: { default: {
options: { options: {
...@@ -103,6 +112,12 @@ module.exports = function(grunt) { ...@@ -103,6 +112,12 @@ module.exports = function(grunt) {
} }
}, },
/**
* 8 :: Extract critical CSS for a defined "above the fold" area.
* If more finetuning is desired: alternative with more options
* or external tool is needed.
*/
penthouse: { penthouse: {
extract : { extract : {
outfile : './css/critical.css', outfile : './css/critical.css',
...@@ -113,6 +128,12 @@ module.exports = function(grunt) { ...@@ -113,6 +128,12 @@ module.exports = function(grunt) {
}, },
}, },
/**
* 9 :: Automatically include CSS that is defined inline in the HTML file.
* Include the ?__inline=true query parameter on assets that need to be
* inlined. Example:
* <link href="css/critical.css?__inline=true" rel="stylesheet" />
*/
inline: { inline: {
dist: { dist: {
options:{ options:{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!