Go to file
2014-09-09 12:56:12 +02:00
test fixed implementation 2014-09-02 08:26:10 +02:00
.editorconfig Initial commit 2014-08-04 00:01:39 +02: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 fixed implementation 2014-09-02 08:26:10 +02:00
LICENSE Initial commit 2014-08-04 00:01:39 +02:00
package.json 0.0.4 2014-09-02 08:26:19 +02: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);