-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathimagemin.node_cli.txt
44 lines (40 loc) · 2.88 KB
/
imagemin.node_cli.txt
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
39
40
41
42
43
44
┏━━━━━━━━━━━━━━┓
┃ IMAGEMIN ┃
┗━━━━━━━━━━━━━━┛
new IMAGEMIN() #Compress images
#Returns IMIN
#Following must be in this order, and can be chained.
#Version 2.0.0
IMIN.src(GLOB_STR) #
IMIN.dest(DIR) #
IMIN.use(IMGMIN.jpegtran(OBJ))#Compress JPEG. OBJ: progressive BOOL (def: false) (def. quality: 75)
IMIN.use(IMGMIN.gifsicle(OBJ))#Compress GIF. OBJ: interlaced BOOL (def: false)
IMIN.use(IMGEMIN.optipng(OBJ))#Compress PNG (lossless). OBJ: optimizationLevel NUM (def: 3, 0 to 7)
IMIN.use(IMGMIN.pngquant(OBJ))#Compress PNG (lossy)
IMIN.use(IMAGEMIN.svgo(OBJ)) #Compress SVG. OBJ: plugins OBJ2_ARR: PLUGIN BOOL (to only include some optimizations)
IMIN.run(FUNC(EROR,BUFER_ARR))#
imagemin [FILE] [DIRECTORY] #Command line. FILE is stdin by def. DIRECTORY is stdout by def
--progressive #
--interlaced #
--optimization-level NUM #
GULP-IMAGEMIN([OBJ]) #Is not working currently (short-term problem, can use IMAGEMIN directly)
#OBJ:
# - progressive BOOL: JPEG
# - interlaced BOOL: GIF
# - optimizationLevel NUM: PNG
# - svgoPlugins STR_ARR
# - use IOSTREAM_ARR, where IOSTREAM can be the return value of:
# - IMAGEMIN-JPEGOPTIM([OBJ]), with OBJ: progressive BOOL, max NUM (quality, 0 to 100),
# size NUM|STR (target size NUM or percentage)
# Version 2.0.0
# - IMAGEMIN-PNGQUANT([OBJ]), with OBJ: quality NUM (0 to 100), speed (def: 3, 1 to 10,
# 10 is fastest), posterize NUM (number of colors), nofs BOOL (def: false, if true,
# disables dithering), floyd NUM (def: 0.5, 0 to 1, level of dithering)
# Version 2.0.0
# - IMAGEMIN-WEBP([OBJ]), with OBJ: preset "default|photo|picture|drawing|icon|text",
# quality NUM (def: 75, 0 to 100), alphaQuality (def: 100, 0 to 100), method (def: 4,
# 0 to 6, speed (6 fastest)), size NUM (target size), sns (def: 80, 0 to 100, noise),
# filter (def: 0, 0 to 100), autoFilter BOOL (def: false), sharpness (def: 0, 0 to 7),
# lossless BOOL (def: false)
# Version 1.0.2
#Version 1.0.1