mirror of
https://github.com/danog/inline-critical.git
synced 2024-11-26 20:14:41 +01:00
Changed readme
This commit is contained in:
parent
7e59c3809d
commit
a21e240773
17
README.md
17
README.md
@ -16,21 +16,20 @@ $ npm install inline-critical
|
|||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var inline = require('inline-critical');
|
const inline = require('inline-critical');
|
||||||
var html = fs.readFileSync('test/fixtures/index.html', 'utf8');
|
const html = fs.readFileSync('test/fixtures/index.html', 'utf8');
|
||||||
var critical = fs.readFileSync('test/fixtures/critical.css', 'utf8');
|
const critical = fs.readFileSync('test/fixtures/critical.css', 'utf8');
|
||||||
|
const inlined = inline(html, critical);
|
||||||
var inlined = inline(html, critical);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example Usage ignoring stylesheet per regex
|
## Example Usage ignoring stylesheet per regex
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var inline = require('inline-critical');
|
const inline = require('inline-critical');
|
||||||
var html = fs.readFileSync('test/fixtures/index.html', 'utf8');
|
const html = fs.readFileSync('test/fixtures/index.html', 'utf8');
|
||||||
var critical = fs.readFileSync('test/fixtures/critical.css', 'utf8');
|
const critical = fs.readFileSync('test/fixtures/critical.css', 'utf8');
|
||||||
|
|
||||||
var inlined = inline(html, critical, {
|
const inlined = inline(html, critical, {
|
||||||
ignore: [/bootstrap/],
|
ignore: [/bootstrap/],
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user