-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
149 lines (138 loc) · 4.24 KB
/
Copy pathindex.d.ts
File metadata and controls
149 lines (138 loc) · 4.24 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
import { PathLike, Stats } from 'fs'
import { WatchOptions } from 'chokidar'
export type GlobPatternLike = string | string[]
// @todo Move RGF specific typings upstream to https://github.com/RealFaviconGenerator/rfg-api
export type RfgConflictValue = 'raise_error'|'override'|'keep_existing'
export interface RfgConfigSettings {
compression?: 0|1|2|3|4|5
errorOnImageTooSmall?: boolean
htmlCodeFile?: boolean
readmeFile?: boolean,
scalingAlgorithm?: 'Mitchell'|'NearestNeighbor'|'Cubic'|'Bilinear'|'Lanczos'|'Spline'
usePathAsIs?: boolean
}
export interface RfgConfigVersioning {
paramName?: string
paramValue?: string
}
export interface RfgConfigDesign {
androidChrome?: {
assets?: {
legacyIcon?: boolean
lowResolutionIcons?: boolean
}
backgroundColor?: string
circleInnerMargin?: number|string
keepPictureInCircle?: boolean
manifest?: {
name?: string
display?: 'browser'|'standalone'
existingManifest?: string
onConflict?: RfgConflictValue
orientation?: 'portrait'|'landscape'
startUrl?: string
themeColor?: string
}
margin?: string
overlay?: boolean
pictureAspect?: 'no_change'|'background_and_margin'|'shadow'
}
coast?: {
pictureAspect?: 'no_change'|'background_and_margin'
}
desktopBrowser?: {}
firefoxApp?: {
backgroundColor?: string
circleInnerMargin?: number|string
keepPictureInCircle?: boolean
manifest?: {
appName?: string
appDescription?: string
developerName?: string
developerUrl?: string
existingManifest?: string
onConflict?: RfgConflictValue
}
margin?: string
overlay?: boolean
pictureAspect?: 'no_change'|'circle'|'rounded_square'|'square'
}
ios?: {
appName?: string
assets?: {
declare_only_default_icon?: boolean
ios6_and_prior_icons?: boolean
ios7_and_later_icons?: boolean
precomposed_icons?: boolean
}
backgroundAndMargin?: string
backgroundColor?: string
margin?: number|string
pictureAspect?: 'no_change'|'background_and_margin'
startupImage?: string
}
openGraph?: {
pictureAspect?: 'no_change'|'background_and_margin'
backgroundColor?: string
margin?: number|string
ratio?: string
siteUrl?: string
}
safariPinnedTab?: {
pictureAspect?: 'no_change'|'silhouette'|'black_and_white'
themeColor?: string
}
windows?: {
appName?: string
assets?: {
windows_80_ie_10_tile?: boolean
windows_10_ie_11_edge_tiles?: {
small?: boolean
medium?: boolean
big?: boolean
rectangle?: boolean
}
}
backgroundColor?: string
existingManifest?: string
onConflict?: RfgConflictValue
pictureAspect?: 'no_change'|'white_silhouette'
}
yandexBrowser?: {
backgroundColor?: string
manifest?: {
errorOnOverride?: boolean
existingManifest?: string
showTitle?: boolean
version?: string
}
}
}
// Based on https://github.com/RealFaviconGenerator/rfg-api/blob/a40346aaf4ebbb3361daf1cc6826a3ac126209f3/index.js#L243-L249
export interface RfgConfig {
apiKey?: string
iconsPath?: string | ((href: string, file: string, fileType: 'html'|'manifest') => string)
design?: RfgConfigDesign
masterPicture?: string
settings?: RfgConfigSettings
versioning?: false|RfgConfigVersioning
}
export interface LaravelMixRfgOptions {
cache?: boolean | number | ((stat?: Stats) => boolean)
config?: RfgConfig
configFile?: string | string[]
debug?: boolean
dest?: string
keep?: boolean
htmlFiles?: GlobPatternLike
htmlComment?: RegExp
manifestFiles?: GlobPatternLike
src?: PathLike | GlobPatternLike
srcCwd?: string,
watch?: false | WatchOptions
}
declare module 'laravel-mix' {
export interface Api {
rfg(options?: LaravelMixRfgOptions): Api
}
}