You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+26-23
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The CSS is inlined as per the supplied options and all stylesheets and style ele
20
20
## Install
21
21
22
22
```
23
-
npm install dr-css-inliner -g
23
+
npm install dr-css-inliner
24
24
```
25
25
26
26
## Usage:
@@ -29,12 +29,6 @@ npm install dr-css-inliner -g
29
29
phantomjs index.js <url> [options]
30
30
```
31
31
32
-
Or as via the globally installed bin:
33
-
34
-
```
35
-
css-inliner <url> [options]
36
-
```
37
-
38
32
#### Options:
39
33
40
34
*`-w, --width [value]` - Determines the width of the viewport. Defaults to 1200.
@@ -47,7 +41,6 @@ css-inliner <url> [options]
47
41
*`-t, --insertion-token [string]` - A token (preferably an HTML comment) to control the exact insertion point of the inlined CSS. If omited default insertion is at the first encountered stylesheet.
48
42
*`-i, --css-id [string]` - Determines the id attribute of the inline style tag. By default no id is added.
49
43
*`-f, --fake-url` - Defines a _fake_ url context. Required when piping in html through `stdin`. Default is null.
50
-
*`-x, --allow-cross-domain` - Allow cross-domain requests (e.g. CSS is located on CDN domain).
51
44
*`-d, --debug` - Prints out an HTML comment in the bottom of the output that exposes some info:
52
45
*`time` - The time in ms it took to run the script (not including the phantomjs process itself).
53
46
*`loadTime` - The time in ms it took to load the webpage.
@@ -62,27 +55,27 @@ css-inliner <url> [options]
62
55
63
56
Only inline the needed above-the-fold CSS for smaller devices:
If you need to parse HTML that is not yet publicly available you can pipe it into `css-inliner`. Below is a contrived example (in a real-world example imagine an httpfilter or similar in place of `cat`):
361
+
If you need to parse HTML that is not yet publicly available you can pipe it into `dr-css-inliner`. Below is a contrived example (in a real-world example imagine an httpfilter or similar in place of `cat`):
0 commit comments