File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 1717``` js
1818const extractCss = require (' extract-css-core' )
1919
20- const css = await extractCss (' http://www.projectwallace.com' )
20+ const css = await extractCss (' https://www.projectwallace.com' )
21+ // => html{font-size:100%} etc.
22+ ```
23+
24+ Or, if you want more details:
25+
26+ ``` js
27+ const entries = await extractCss (' https://www.projectwallace.com' , {
28+ origins: ' include'
29+ })
30+
31+ // entries will look something like this
32+ [
33+ {
34+ href: ' https://www.projectwallace.com' ,
35+ type: ' link-or-import' ,
36+ css: ' @font-face{font-display:swap;font-family:Teko;...'
37+ },
38+ {
39+ href: ' https://www.projectwallace.com/client/Seo.0f4fe72f.css' ,
40+ type: ' style' ,
41+ css: ' .hero__text.svelte-qhblau a{color:var(--teal-400)}...'
42+ },
43+ {
44+ href: ' https://www.projectwallace.com' ,
45+ type: ' inline' ,
46+ css: ' [x-extract-css-inline-style] { position: absolute; }'
47+ }
48+ ]
2149```
2250
2351## Installation
You can’t perform that action at this time.
0 commit comments