forked from ehmicky/Notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuncss.node_cli.txt
More file actions
38 lines (28 loc) · 1.82 KB
/
uncss.node_cli.txt
File metadata and controls
38 lines (28 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
┏━━━━━━━━━━━┓
┃ UNCSS ┃
┗━━━━━━━━━━━┛
ALTERNATIVES ==> # - uncss (prefer): more popular. More features
# - mincss: in Python
VERSION ==> #0.13.0
#Remove unused CSS.
#Works by loading HTML (including CSS + synchronous JavaScript) using PhantomJS, then checking which
#SELECTORS is not matching anything.
CONF ==> #Can be:
# - uncss --uncssrc CONF.json
# - uncss --VAR
# - UNCSS(CONF)
uncss FILE.html|URL... #Output stipped down CSS
--timeout NUM #Wait for NUMms so that async JavaScript can load
--ignore SELECTOR_REGEXP,... #Keep those rulesets
#Can also use /* uncss:ignore */ in CSS
--media MEDIAQUERYLIST,... #Consider those @media (def: only @media all, screen)
--raw 'CSS' #Specify extra CSS
--stylesheets FILE.css,... #Specify CSS files instead of <style> tags found in HTML
--ignoreSheets REGEXP,... #Do not process specific CSS files
--csspath DIR #<link href> relative path
--htmlroot DIR #<link href> absolute path
UNCSS('FILE.html|URL'_ARR, [CONF,]#As Node module or PostCSS module
FUNC(ERROR, 'CSS', OBJ)) #OBJ are stats only available if CONF.report true
#OBJ:
# - all 'SELECTOR'_ARR
# - used 'SELECTOR'_ARR