Go to file
2014-10-18 22:12:33 -03:00
test implement extract options and test it out 2014-10-18 22:12:33 -03:00
.editorconfig implement extract options and test it out 2014-10-18 22:12:33 -03:00
.gitignore Initial commit 2014-08-04 00:01:39 +02:00
.jshintrc Initial commit 2014-08-04 00:01:39 +02:00
.travis.yml Initial commit 2014-08-04 00:01:39 +02:00
Gruntfile.js Initial commit 2014-08-04 00:01:39 +02:00
index.js implement extract options and test it out 2014-10-18 22:12:33 -03:00
LICENSE Initial commit 2014-08-04 00:01:39 +02:00
package.json implement extract options and test it out 2014-10-18 22:12:33 -03:00
README.md Update README.md 2014-09-09 12:56:12 +02:00

inline-critical

Inline critical-path css and load the existing stylesheets asynchronously. Existing link tags will also be wrapped in <noscript> so the users with javscript disabled will see the site rendered normally.

build status

Installation

This module is installed via npm:

$ npm install inline-critical

Example Usage

var inline = require('inline-critical');
var html = fs.readFileSync('test/fixtures/index.html', 'utf8');
var critical = fs.readFileSync('test/fixtures/critical.css', 'utf8');

var inlined = inline(html, critical);