|
| 1 | + |
| 2 | +export type iOSType = 'ipad' | 'ipadpro9' | 'ipadpro9' | 'ipadpro10' | 'ipadpro12' | 'iphonese' | 'iphone6' | 'iphoneplus' | 'iphonex' | 'iphonexr' | 'iphonexsmax' |
| 3 | +export type iOSSize = [number, number, iOSType] |
| 4 | + |
| 5 | +export interface IconOptions { |
| 6 | + /** |
| 7 | + * Default: `[srcDir]/[staticDir]/icon.png` |
| 8 | + */ |
| 9 | + source: string, |
| 10 | + /** |
| 11 | + * Default: `icon.png` |
| 12 | + */ |
| 13 | + fileName: string, |
| 14 | + /** |
| 15 | + * Array of sizes to be generated (Square). |
| 16 | + * Default: `[64, 120, 144, 152, 192, 384, 512]` |
| 17 | + */ |
| 18 | + sizes: number[], |
| 19 | + |
| 20 | + /** |
| 21 | + * Default: |
| 22 | + * ```javascript |
| 23 | + * [ |
| 24 | + * [1536, 2048, 'ipad'], // Ipad |
| 25 | + * [1536, 2048, 'ipadpro9'], // Ipad Pro 9.7" |
| 26 | + * [1668, 2224, 'ipadpro10'], // Ipad Pro 10.5" |
| 27 | + * [2048, 2732, 'ipadpro12'], // Ipad Pro 12.9" |
| 28 | + * [640, 1136, 'iphonese'], // Iphone SE |
| 29 | + * [50, 1334, 'iphone6'], // Iphone 6 |
| 30 | + * [1080, 1920, 'iphoneplus'], // Iphone Plus |
| 31 | + * [1125, 2436, 'iphonex'], // Iphone X |
| 32 | + * [828, 1792, 'iphonexr'], // Iphone XR |
| 33 | + * [1242, 2688, 'iphonexsmax'] // Iphone XS Max |
| 34 | + * ] |
| 35 | + * ``` |
| 36 | + */ |
| 37 | + iosSizes: iOSSize[], |
| 38 | + /** |
| 39 | + * Default: `icons` |
| 40 | + */ |
| 41 | + targetDir: string, |
| 42 | + /** |
| 43 | + * Make icons accessible through `ctx` or Vue instances. |
| 44 | + * |
| 45 | + * Default: `true` |
| 46 | + */ |
| 47 | + plugin: boolean, |
| 48 | + /** |
| 49 | + * Name of property for accessible icons. |
| 50 | + * |
| 51 | + * Default: `$icon` |
| 52 | + */ |
| 53 | + pluginName: string, |
| 54 | + /** |
| 55 | + * Array or string of icon purpose. |
| 56 | + * |
| 57 | + * Default: `['any', 'maskable']` |
| 58 | + */ |
| 59 | + purpose: string[] | string, |
| 60 | + /** |
| 61 | + * Cache dir for generated icons |
| 62 | + * |
| 63 | + * Default: `{rootDir}/node_modules/.cache/icon` |
| 64 | + */ |
| 65 | + cacheDir: string |
| 66 | +} |
0 commit comments