@quasar/icongenie 3.1.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/bin/icongenie.js +22 -22
- package/lib/cmd/generate.js +36 -41
- package/lib/cmd/help.js +1 -1
- package/lib/cmd/profile.js +34 -38
- package/lib/cmd/verify.js +18 -17
- package/lib/generators/icns.js +7 -3
- package/lib/generators/ico.js +7 -3
- package/lib/generators/index.js +0 -1
- package/lib/generators/png.js +7 -6
- package/lib/generators/splashscreen.js +6 -12
- package/lib/generators/svg.js +3 -4
- package/lib/modes/index.js +1 -8
- package/lib/modes/{quasar-app-v2 → v2}/bex.js +1 -2
- package/lib/modes/{quasar-app-v1 → v2}/capacitor.js +28 -35
- package/lib/modes/{quasar-app-v1 → v2}/cordova.js +40 -47
- package/lib/modes/v2/electron.js +32 -0
- package/lib/modes/{quasar-app-v1 → v2}/index.js +0 -1
- package/lib/modes/v2/pwa.js +71 -0
- package/lib/modes/{quasar-app-v2 → v2}/spa.js +1 -2
- package/lib/modes/{quasar-app-v1 → v2}/ssr.js +1 -2
- package/lib/mount/index.js +4 -7
- package/lib/mount/mount-cordova.js +71 -63
- package/lib/mount/mount-tag.js +3 -6
- package/lib/runner/generate.js +57 -55
- package/lib/runner/profile.js +18 -26
- package/lib/runner/verify.js +29 -27
- package/lib/utils/app-paths.js +8 -9
- package/lib/utils/default-params.js +0 -1
- package/lib/utils/filter-argv-params.js +3 -4
- package/lib/utils/get-argv.js +47 -0
- package/lib/utils/get-assets-files.js +9 -12
- package/lib/utils/get-compression.js +31 -19
- package/lib/utils/get-file-size.js +5 -6
- package/lib/utils/get-files-options.js +18 -21
- package/lib/utils/get-png-size.js +7 -11
- package/lib/utils/get-profile-content.js +3 -7
- package/lib/utils/get-profile-files.js +10 -13
- package/lib/utils/get-square-icon.js +5 -4
- package/lib/utils/logger.js +6 -7
- package/lib/utils/merge-objects.js +5 -6
- package/lib/utils/node-version-check.js +11 -11
- package/lib/utils/package-json.js +1 -5
- package/lib/utils/parse-argv.js +63 -74
- package/lib/utils/spawn-sync.js +10 -10
- package/lib/utils/validate-profile-object.js +34 -27
- package/package.json +48 -50
- package/samples/icongenie-profile.json +9 -17
- package/.editorconfig +0 -13
- package/.eslintignore +0 -1
- package/.eslintrc.cjs +0 -50
- package/lib/modes/quasar-app-v1/bex.js +0 -9
- package/lib/modes/quasar-app-v1/electron.js +0 -24
- package/lib/modes/quasar-app-v1/pwa.js +0 -74
- package/lib/modes/quasar-app-v1/spa.js +0 -17
- package/lib/modes/quasar-app-v2/capacitor.js +0 -155
- package/lib/modes/quasar-app-v2/cordova.js +0 -159
- package/lib/modes/quasar-app-v2/electron.js +0 -24
- package/lib/modes/quasar-app-v2/index.js +0 -45
- package/lib/modes/quasar-app-v2/pwa.js +0 -74
- package/lib/modes/quasar-app-v2/ssr.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"params": {
|
|
3
3
|
"icon": "icongenie-icon.png",
|
|
4
|
-
"include": [
|
|
4
|
+
"include": ["spa"],
|
|
5
5
|
"quality": 7
|
|
6
6
|
},
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"generator": "png",
|
|
11
11
|
"name": "icon-{size}x{size}.png",
|
|
12
12
|
"folder": "src-bex/icons",
|
|
13
|
-
"sizes": [
|
|
13
|
+
"sizes": [16, 48, 128]
|
|
14
14
|
},
|
|
15
15
|
|
|
16
16
|
{
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
"generator": "splashscreen",
|
|
24
24
|
"name": "apple-launch-{size}.png",
|
|
25
25
|
"folder": "src/statics/icons",
|
|
26
|
-
"sizes": [
|
|
27
|
-
[ 1668, 2388 ]
|
|
28
|
-
],
|
|
26
|
+
"sizes": [[1668, 2388]],
|
|
29
27
|
"tag": "<link rel=\"apple-touch-startup-image\" media=\"(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)\" href=\"statics/icons/{name}\">"
|
|
30
28
|
},
|
|
31
29
|
|
|
@@ -45,16 +43,14 @@
|
|
|
45
43
|
"generator": "splashscreen",
|
|
46
44
|
"name": "Default-Landscape-2436h.png",
|
|
47
45
|
"folder": "src-cordova/res/screen/ios",
|
|
48
|
-
"sizes": [
|
|
49
|
-
[ 2436, 1125 ]
|
|
50
|
-
]
|
|
46
|
+
"sizes": [[2436, 1125]]
|
|
51
47
|
},
|
|
52
48
|
|
|
53
49
|
{
|
|
54
50
|
"generator": "png",
|
|
55
51
|
"name": "icon-29@2x.png",
|
|
56
52
|
"folder": "src-cordova/res/ios",
|
|
57
|
-
"sizes": [
|
|
53
|
+
"sizes": [58],
|
|
58
54
|
"platform": "cordova-ios",
|
|
59
55
|
"background": true
|
|
60
56
|
},
|
|
@@ -63,7 +59,7 @@
|
|
|
63
59
|
"generator": "png",
|
|
64
60
|
"name": "icon-29@2x.png",
|
|
65
61
|
"folder": "src-cordova/res/ios",
|
|
66
|
-
"sizes": [
|
|
62
|
+
"sizes": [58],
|
|
67
63
|
"platform": "cordova-ios",
|
|
68
64
|
"background": true
|
|
69
65
|
},
|
|
@@ -72,7 +68,7 @@
|
|
|
72
68
|
"generator": "png",
|
|
73
69
|
"name": "xxxhdpi.png",
|
|
74
70
|
"folder": "src-cordova/res/android",
|
|
75
|
-
"sizes": [
|
|
71
|
+
"sizes": [192],
|
|
76
72
|
"platform": "cordova-android",
|
|
77
73
|
"density": "xxxhdpi"
|
|
78
74
|
},
|
|
@@ -81,9 +77,7 @@
|
|
|
81
77
|
"generator": "splashscreen",
|
|
82
78
|
"name": "Default@2x~ipad~comany.png",
|
|
83
79
|
"folder": "src-cordova/res/screen/ios",
|
|
84
|
-
"sizes": [
|
|
85
|
-
[ 1278, 2732 ]
|
|
86
|
-
],
|
|
80
|
+
"sizes": [[1278, 2732]],
|
|
87
81
|
"platform": "cordova-ios"
|
|
88
82
|
},
|
|
89
83
|
|
|
@@ -91,9 +85,7 @@
|
|
|
91
85
|
"generator": "splashscreen",
|
|
92
86
|
"name": "splash-land-xxxhdpi.png",
|
|
93
87
|
"folder": "src-cordova/res/screen/android",
|
|
94
|
-
"sizes": [
|
|
95
|
-
[ 1920, 1280 ]
|
|
96
|
-
],
|
|
88
|
+
"sizes": [[1920, 1280]],
|
|
97
89
|
"platform": "cordova-android",
|
|
98
90
|
"density": "land-xxxhdpi"
|
|
99
91
|
}
|
package/.editorconfig
DELETED
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
samples/
|
package/.eslintrc.cjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports = {
|
|
3
|
-
root: true,
|
|
4
|
-
|
|
5
|
-
parserOptions: {
|
|
6
|
-
ecmaVersion: 'latest',
|
|
7
|
-
sourceType: 'module'
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
env: {
|
|
11
|
-
node: true,
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
extends: [
|
|
15
|
-
'eslint:recommended',
|
|
16
|
-
'plugin:n/recommended'
|
|
17
|
-
],
|
|
18
|
-
|
|
19
|
-
rules: {
|
|
20
|
-
'no-empty': 'off',
|
|
21
|
-
'no-useless-escape': 'off',
|
|
22
|
-
'no-unused-vars': [ 'error', { ignoreRestSiblings: true, argsIgnorePattern: '^_' } ],
|
|
23
|
-
|
|
24
|
-
'n/no-process-exit': 'off',
|
|
25
|
-
|
|
26
|
-
'brace-style': [ 2, 'stroustrup', { allowSingleLine: true } ],
|
|
27
|
-
'prefer-const': 2,
|
|
28
|
-
'prefer-promise-reject-errors': 'off',
|
|
29
|
-
'multiline-ternary': 'off',
|
|
30
|
-
'no-prototype-builtins': 'off',
|
|
31
|
-
'no-case-declarations': 'off',
|
|
32
|
-
'generator-star-spacing': 'off',
|
|
33
|
-
'arrow-parens': 'off',
|
|
34
|
-
'object-property-newline': 'off',
|
|
35
|
-
'one-var': 'off',
|
|
36
|
-
'no-void': 'off',
|
|
37
|
-
'no-lone-blocks': 'error',
|
|
38
|
-
'no-unused-expressions': [ 'error', { allowShortCircuit: true } ],
|
|
39
|
-
'no-useless-concat': 'error',
|
|
40
|
-
'no-useless-return': 'error',
|
|
41
|
-
'no-unneeded-ternary': 'error',
|
|
42
|
-
'no-confusing-arrow': [ 'error', { allowParens: true } ],
|
|
43
|
-
'operator-linebreak': [ 'error', 'before' ],
|
|
44
|
-
|
|
45
|
-
'array-bracket-spacing': [ 'error', 'always' ],
|
|
46
|
-
'object-curly-spacing': [ 'error', 'always' ],
|
|
47
|
-
'computed-property-spacing': [ 'error', 'always' ],
|
|
48
|
-
'template-curly-spacing': [ 'error', 'always' ]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export default [
|
|
3
|
-
{
|
|
4
|
-
// macos (embedded icons)
|
|
5
|
-
generator: 'icns',
|
|
6
|
-
name: 'icon.icns',
|
|
7
|
-
folder: 'src-electron/icons'
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
// windows (embedded icon)
|
|
12
|
-
generator: 'ico',
|
|
13
|
-
name: 'icon.ico',
|
|
14
|
-
folder: 'src-electron/icons'
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
// linux
|
|
19
|
-
generator: 'png',
|
|
20
|
-
name: 'linux-512x512.png',
|
|
21
|
-
folder: 'src-electron/icons',
|
|
22
|
-
sizes: [ 512 ]
|
|
23
|
-
}
|
|
24
|
-
]
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import spaEntries from './spa.js'
|
|
3
|
-
|
|
4
|
-
/* def: width, height, pixel-ratio */
|
|
5
|
-
function getAppleLaunch (def) {
|
|
6
|
-
const media = `(device-width: ${ def[ 0 ] / def[ 2 ] }px) and (device-height: ${ def[ 1 ] / def[ 2 ] }px) and (-webkit-device-pixel-ratio: ${ def[ 2 ] })`
|
|
7
|
-
|
|
8
|
-
return {
|
|
9
|
-
generator: 'splashscreen',
|
|
10
|
-
name: 'apple-launch-{size}.png',
|
|
11
|
-
folder: 'src/statics/icons',
|
|
12
|
-
sizes: [
|
|
13
|
-
[ def[ 0 ], def[ 1 ] ]
|
|
14
|
-
],
|
|
15
|
-
tag: `${ def[ 3 ] }\n<link rel="apple-touch-startup-image" media="${ media }" href="statics/icons/{name}">`
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default [
|
|
20
|
-
...spaEntries,
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
generator: 'png',
|
|
24
|
-
name: 'apple-icon-{size}x{size}.png',
|
|
25
|
-
folder: 'src/statics/icons',
|
|
26
|
-
background: true,
|
|
27
|
-
sizes: [ 120, 152, 167, 180 ]
|
|
28
|
-
// tag is auto-injected by @quasar/app
|
|
29
|
-
// <link rel="apple-touch-icon" sizes="{size}x{size}" href="statics/icons/{name}">
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
generator: 'svg',
|
|
34
|
-
name: 'safari-pinned-tab.svg',
|
|
35
|
-
folder: 'src/statics/icons',
|
|
36
|
-
// tag is auto-injected by @quasar/app
|
|
37
|
-
// <link rel="mask-icon" color="#..." href="statics/icons/{name}">
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
generator: 'png',
|
|
42
|
-
name: 'ms-icon-{size}x{size}.png',
|
|
43
|
-
folder: 'src/statics/icons',
|
|
44
|
-
sizes: [ 144 ],
|
|
45
|
-
// tag is auto-injected by @quasar/app
|
|
46
|
-
// <meta name="msapplication-TileImage" content="statics/icons/{name}">
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
generator: 'png',
|
|
51
|
-
name: 'icon-{size}x{size}.png',
|
|
52
|
-
folder: 'src/statics/icons',
|
|
53
|
-
sizes: [ 128, 192, 256, 384, 512 ]
|
|
54
|
-
// manifest icons
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
...[
|
|
58
|
-
[ 1290, 2796, 3, '<!-- iPhone 14 Pro, 14 Pro Max -->' ],
|
|
59
|
-
[ 1179, 2556, 3, '<!-- iPhone 14, 14 Pro -->' ],
|
|
60
|
-
[ 1284, 2778, 3, '<!-- iPhone 12 Pro Max, 13 Pro Max -->' ],
|
|
61
|
-
[ 1170, 2532, 3, '<!-- iPhone 12, 12 Pro, 13, 13 Pro -->' ],
|
|
62
|
-
[ 1080, 2340, 3, '<!-- iPhone 13 Mini -->' ],
|
|
63
|
-
[ 828, 1792, 2, '<!-- iPhone XR, 11 -->' ],
|
|
64
|
-
[ 1125, 2436, 3, '<!-- iPhone X, XS, 12 mini, 11 Pro -->' ],
|
|
65
|
-
[ 1242, 2688, 3, '<!-- iPhone XS Max, 11 Pro Max -->' ],
|
|
66
|
-
[ 750, 1334, 2, '<!-- iPhone 8, 7, 6s, 6 -->' ],
|
|
67
|
-
[ 1242, 2208, 3, '<!-- iPhone 8 Plus, 7 Plus, 6s Plus, 6 Plus -->' ],
|
|
68
|
-
[ 1620, 2160, 2, '<!-- iPad 10.2" -->' ],
|
|
69
|
-
[ 1536, 2048, 2, '<!-- iPad Mini, Air, 9.7" -->' ],
|
|
70
|
-
[ 1668, 2224, 2, '<!-- iPad Pro 10.5" -->' ],
|
|
71
|
-
[ 1668, 2388, 2, '<!-- iPad Pro 11" -->' ],
|
|
72
|
-
[ 2048, 2732, 2, '<!-- iPad Pro 12.9" -->' ]
|
|
73
|
-
].map(getAppleLaunch)
|
|
74
|
-
]
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export default [
|
|
3
|
-
{
|
|
4
|
-
generator: 'png',
|
|
5
|
-
name: 'favicon-{size}x{size}.png',
|
|
6
|
-
folder: 'src/statics/icons',
|
|
7
|
-
sizes: [ 128, 96, 32, 16 ],
|
|
8
|
-
tag: `<link rel="icon" type="image/png" sizes="{size}x{size}" href="statics/icons/{name}">`
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
generator: 'ico',
|
|
13
|
-
name: 'favicon.ico',
|
|
14
|
-
folder: 'src/statics/icons',
|
|
15
|
-
tag: `<link rel="icon" type="image/ico" href="statics/icons/{name}">`
|
|
16
|
-
}
|
|
17
|
-
]
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const iosIconRegex = /AppIcon-(\d+\.?\d?)x?(\d+\.?\d?)?@?(\d+)?x?-?\d?\.png/
|
|
3
|
-
|
|
4
|
-
function getAndroidIcons (entries) {
|
|
5
|
-
const list = []
|
|
6
|
-
|
|
7
|
-
entries.forEach(entry => {
|
|
8
|
-
const icon = {
|
|
9
|
-
generator: 'png',
|
|
10
|
-
folder: `src-capacitor/android/app/src/main/res/mipmap-${ entry[ 0 ] }`
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
list.push({
|
|
14
|
-
...icon,
|
|
15
|
-
name: 'ic_launcher_foreground.png',
|
|
16
|
-
sizes: [ entry[ 2 ] ]
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
list.push({
|
|
20
|
-
...icon,
|
|
21
|
-
name: 'ic_launcher_round.png',
|
|
22
|
-
sizes: [ entry[ 1 ] ]
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
list.push({
|
|
26
|
-
...icon,
|
|
27
|
-
name: 'ic_launcher.png',
|
|
28
|
-
sizes: [ entry[ 1 ] ]
|
|
29
|
-
})
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
return list
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function getAndroidSplashscreen (entries) {
|
|
36
|
-
const list = []
|
|
37
|
-
|
|
38
|
-
entries.forEach(entry => {
|
|
39
|
-
const icon = {
|
|
40
|
-
generator: 'splashscreen',
|
|
41
|
-
name: 'splash.png'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
list.push({
|
|
45
|
-
...icon,
|
|
46
|
-
folder: `src-capacitor/android/app/src/main/res/drawable-land-${ entry[ 0 ] }`,
|
|
47
|
-
sizes: [
|
|
48
|
-
[ entry[ 1 ], entry[ 2 ] ]
|
|
49
|
-
]
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
list.push({
|
|
53
|
-
...icon,
|
|
54
|
-
folder: `src-capacitor/android/app/src/main/res/drawable-port-${ entry[ 0 ] }`,
|
|
55
|
-
sizes: [
|
|
56
|
-
[ entry[ 2 ], entry[ 1 ] ]
|
|
57
|
-
]
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
return list
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function getIosIcon (name) {
|
|
65
|
-
const [ ,size,,multiplier ] = name.match(iosIconRegex)
|
|
66
|
-
|
|
67
|
-
return {
|
|
68
|
-
generator: 'png',
|
|
69
|
-
name,
|
|
70
|
-
folder: 'src-capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset',
|
|
71
|
-
sizes: [
|
|
72
|
-
multiplier
|
|
73
|
-
? parseFloat(size) * parseInt(multiplier,10)
|
|
74
|
-
: parseFloat(size)
|
|
75
|
-
],
|
|
76
|
-
background: true
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default [
|
|
81
|
-
/***************
|
|
82
|
-
*** Android ***
|
|
83
|
-
***************/
|
|
84
|
-
|
|
85
|
-
...getAndroidIcons([
|
|
86
|
-
[ 'hdpi', 49, 162 ],
|
|
87
|
-
[ 'mdpi', 48, 108 ],
|
|
88
|
-
[ 'xhdpi', 96, 216 ],
|
|
89
|
-
[ 'xxhdpi', 144, 324 ],
|
|
90
|
-
[ 'xxxhdpi', 192, 432 ]
|
|
91
|
-
]),
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
generator: 'splashscreen',
|
|
95
|
-
name: 'splash.png',
|
|
96
|
-
folder: 'src-capacitor/android/app/src/main/res/drawable',
|
|
97
|
-
sizes: [
|
|
98
|
-
[ 480, 320 ]
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
...getAndroidSplashscreen([
|
|
103
|
-
[ 'mdpi', 480, 320 ],
|
|
104
|
-
[ 'hdpi', 800, 480 ],
|
|
105
|
-
[ 'xhdpi', 1280, 720 ],
|
|
106
|
-
[ 'xxhdpi', 1600, 960 ],
|
|
107
|
-
[ 'xxxhdpi', 1920, 1280 ]
|
|
108
|
-
]),
|
|
109
|
-
|
|
110
|
-
/**************
|
|
111
|
-
**** iOS *****
|
|
112
|
-
**************/
|
|
113
|
-
|
|
114
|
-
...[
|
|
115
|
-
'AppIcon-20x20@1x.png',
|
|
116
|
-
'AppIcon-20x20@2x-1.png',
|
|
117
|
-
'AppIcon-20x20@2x.png',
|
|
118
|
-
'AppIcon-20x20@3x.png',
|
|
119
|
-
'AppIcon-29x29@1x.png',
|
|
120
|
-
'AppIcon-29x29@2x-1.png',
|
|
121
|
-
'AppIcon-29x29@2x.png',
|
|
122
|
-
'AppIcon-29x29@3x.png',
|
|
123
|
-
'AppIcon-40x40@1x.png',
|
|
124
|
-
'AppIcon-40x40@2x-1.png',
|
|
125
|
-
'AppIcon-40x40@2x.png',
|
|
126
|
-
'AppIcon-40x40@3x.png',
|
|
127
|
-
'AppIcon-60x60@2x.png',
|
|
128
|
-
'AppIcon-60x60@3x.png',
|
|
129
|
-
'AppIcon-76x76@1x.png',
|
|
130
|
-
'AppIcon-76x76@2x.png',
|
|
131
|
-
'AppIcon-83.5x83.5@2x.png',
|
|
132
|
-
'AppIcon-512@2x.png'
|
|
133
|
-
].map(getIosIcon),
|
|
134
|
-
|
|
135
|
-
{
|
|
136
|
-
generator: 'splashscreen',
|
|
137
|
-
name: 'splash-2732x2732-1.png',
|
|
138
|
-
folder: 'src-capacitor/ios/App/App/Assets.xcassets/Splash.imageset',
|
|
139
|
-
sizes: [ 2732 ]
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
generator: 'splashscreen',
|
|
144
|
-
name: 'splash-2732x2732-2.png',
|
|
145
|
-
folder: 'src-capacitor/ios/App/App/Assets.xcassets/Splash.imageset',
|
|
146
|
-
sizes: [ 2732 ]
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
{
|
|
150
|
-
generator: 'splashscreen',
|
|
151
|
-
name: 'splash-2732x2732.png',
|
|
152
|
-
folder: 'src-capacitor/ios/App/App/Assets.xcassets/Splash.imageset',
|
|
153
|
-
sizes: [ 2732 ]
|
|
154
|
-
}
|
|
155
|
-
]
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const iosIconRegex = /icon-(\d+\.?\d?)@?(\d+)?x?\.png/
|
|
3
|
-
|
|
4
|
-
function getAndroidIcon (entry) {
|
|
5
|
-
return {
|
|
6
|
-
generator: 'png',
|
|
7
|
-
name: `${ entry[ 0 ] }.png`,
|
|
8
|
-
folder: 'src-cordova/res/android',
|
|
9
|
-
sizes: [ entry[ 1 ] ],
|
|
10
|
-
platform: 'cordova-android',
|
|
11
|
-
density: entry[ 0 ]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function getAndroidSplashscreens (entries) {
|
|
16
|
-
const list = []
|
|
17
|
-
|
|
18
|
-
entries.forEach(entry => {
|
|
19
|
-
list.push({
|
|
20
|
-
generator: 'splashscreen',
|
|
21
|
-
name: `splash-land-${ entry[ 0 ] }.png`,
|
|
22
|
-
folder: 'src-cordova/res/screen/android',
|
|
23
|
-
sizes: [
|
|
24
|
-
[ entry[ 1 ], entry[ 2 ] ]
|
|
25
|
-
],
|
|
26
|
-
platform: 'cordova-android',
|
|
27
|
-
density: `land-${ entry[ 0 ] }`
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
list.push({
|
|
31
|
-
generator: 'splashscreen',
|
|
32
|
-
name: `splash-port-${ entry[ 0 ] }.png`,
|
|
33
|
-
folder: 'src-cordova/res/screen/android',
|
|
34
|
-
sizes: [
|
|
35
|
-
[ entry[ 2 ], entry[ 1 ] ]
|
|
36
|
-
],
|
|
37
|
-
platform: 'cordova-android',
|
|
38
|
-
density: `port-${ entry[ 0 ] }`
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
return list
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function getIosIcon (name) {
|
|
46
|
-
const [ ,size,multiplier ] = name.match(iosIconRegex)
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
generator: 'png',
|
|
50
|
-
name,
|
|
51
|
-
folder: 'src-cordova/res/ios',
|
|
52
|
-
sizes: [
|
|
53
|
-
multiplier
|
|
54
|
-
? parseFloat(size) * parseInt(multiplier,10)
|
|
55
|
-
: parseFloat(size)
|
|
56
|
-
],
|
|
57
|
-
platform: 'cordova-ios',
|
|
58
|
-
background: true
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function getIosSplashscreen (entry) {
|
|
63
|
-
return {
|
|
64
|
-
generator: 'splashscreen',
|
|
65
|
-
name: entry[ 0 ],
|
|
66
|
-
folder: 'src-cordova/res/screen/ios',
|
|
67
|
-
sizes: [
|
|
68
|
-
[ entry[ 1 ], entry[ 2 ] ]
|
|
69
|
-
],
|
|
70
|
-
platform: 'cordova-ios'
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export default [
|
|
75
|
-
/***************
|
|
76
|
-
*** Android ***
|
|
77
|
-
***************/
|
|
78
|
-
|
|
79
|
-
...[
|
|
80
|
-
[ 'ldpi', 36 ],
|
|
81
|
-
[ 'mdpi', 48 ],
|
|
82
|
-
[ 'hdpi', 72 ],
|
|
83
|
-
[ 'xhdpi', 96 ],
|
|
84
|
-
[ 'xxhdpi', 144 ],
|
|
85
|
-
[ 'xxxhdpi', 192 ],
|
|
86
|
-
].map(getAndroidIcon),
|
|
87
|
-
|
|
88
|
-
...getAndroidSplashscreens([
|
|
89
|
-
[ 'ldpi', 320, 200 ],
|
|
90
|
-
[ 'mdpi', 480, 320 ],
|
|
91
|
-
[ 'hdpi', 800, 480 ],
|
|
92
|
-
[ 'xhdpi', 1280, 720 ],
|
|
93
|
-
[ 'xxhdpi', 1600, 960 ],
|
|
94
|
-
[ 'xxxhdpi', 1920, 1280 ]
|
|
95
|
-
]),
|
|
96
|
-
|
|
97
|
-
/**************
|
|
98
|
-
**** iOS *****
|
|
99
|
-
**************/
|
|
100
|
-
|
|
101
|
-
{
|
|
102
|
-
generator: 'png',
|
|
103
|
-
name: 'icon.png',
|
|
104
|
-
folder: 'src-cordova/res/ios',
|
|
105
|
-
sizes: [ 57 ],
|
|
106
|
-
platform: 'cordova-ios',
|
|
107
|
-
background: true
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
generator: 'png',
|
|
111
|
-
name: 'icon@2x.png',
|
|
112
|
-
folder: 'src-cordova/res/ios',
|
|
113
|
-
sizes: [ 114 ],
|
|
114
|
-
platform: 'cordova-ios',
|
|
115
|
-
background: true
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
...[
|
|
119
|
-
'icon-20@2x.png',
|
|
120
|
-
'icon-20@3x.png',
|
|
121
|
-
'icon-29.png',
|
|
122
|
-
'icon-29@2x.png',
|
|
123
|
-
'icon-29@3x.png',
|
|
124
|
-
'icon-40@2x.png',
|
|
125
|
-
'icon-60@2x.png',
|
|
126
|
-
'icon-60@3x.png',
|
|
127
|
-
'icon-20.png',
|
|
128
|
-
'icon-20@2x.png',
|
|
129
|
-
'icon-40.png',
|
|
130
|
-
'icon-50.png',
|
|
131
|
-
'icon-50@2x.png',
|
|
132
|
-
'icon-72.png',
|
|
133
|
-
'icon-72@2x.png',
|
|
134
|
-
'icon-76.png',
|
|
135
|
-
'icon-76@2x.png',
|
|
136
|
-
'icon-83.5@2x.png',
|
|
137
|
-
'icon-1024.png',
|
|
138
|
-
'icon-24@2x.png',
|
|
139
|
-
'icon-27.5@2x.png',
|
|
140
|
-
'icon-29@2x.png',
|
|
141
|
-
'icon-29@3x.png',
|
|
142
|
-
'icon-40@2x.png',
|
|
143
|
-
'icon-44@2x.png',
|
|
144
|
-
'icon-50@2x.png',
|
|
145
|
-
'icon-86@2x.png',
|
|
146
|
-
'icon-98@2x.png'
|
|
147
|
-
].map(getIosIcon),
|
|
148
|
-
|
|
149
|
-
...[
|
|
150
|
-
[ 'Default@2x~iphone~anyany.png', 1334, 1334 ],
|
|
151
|
-
[ 'Default@2x~iphone~comany.png', 750, 1334 ],
|
|
152
|
-
[ 'Default@2x~iphone~comcom.png', 1334, 750 ],
|
|
153
|
-
[ 'Default@3x~iphone~anyany.png', 2208, 2208 ],
|
|
154
|
-
[ 'Default@3x~iphone~anycom.png', 2208, 1242 ],
|
|
155
|
-
[ 'Default@3x~iphone~comany.png', 1242, 2208 ],
|
|
156
|
-
[ 'Default@2x~ipad~anyany.png', 2732, 2732 ],
|
|
157
|
-
[ 'Default@2x~ipad~comany.png', 1278, 2732 ]
|
|
158
|
-
].map(getIosSplashscreen)
|
|
159
|
-
]
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export default [
|
|
3
|
-
{
|
|
4
|
-
// macos (embedded icons)
|
|
5
|
-
generator: 'icns',
|
|
6
|
-
name: 'icon.icns',
|
|
7
|
-
folder: 'src-electron/icons'
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
// windows (embedded icon)
|
|
12
|
-
generator: 'ico',
|
|
13
|
-
name: 'icon.ico',
|
|
14
|
-
folder: 'src-electron/icons'
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
// tray icon (all platforms)
|
|
19
|
-
generator: 'png',
|
|
20
|
-
name: 'icon.png',
|
|
21
|
-
folder: 'src-electron/icons',
|
|
22
|
-
sizes: [ 512 ]
|
|
23
|
-
}
|
|
24
|
-
]
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import spaAssets from './spa.js'
|
|
3
|
-
import pwaAssets from './pwa.js'
|
|
4
|
-
import ssrAssets from './ssr.js'
|
|
5
|
-
import bexAssets from './bex.js'
|
|
6
|
-
import cordovaAssets from './cordova.js'
|
|
7
|
-
import capacitorAssets from './capacitor.js'
|
|
8
|
-
import electronAssets from './electron.js'
|
|
9
|
-
|
|
10
|
-
export const modes = {
|
|
11
|
-
spa: {
|
|
12
|
-
folder: '/src',
|
|
13
|
-
assets: spaAssets
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
pwa: {
|
|
17
|
-
folder: '/src-pwa',
|
|
18
|
-
assets: pwaAssets
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
ssr: {
|
|
22
|
-
folder: '/src-ssr',
|
|
23
|
-
assets: ssrAssets
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
bex: {
|
|
27
|
-
folder: '/src-bex',
|
|
28
|
-
assets: bexAssets
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
cordova: {
|
|
32
|
-
folder: '/src-cordova',
|
|
33
|
-
assets: cordovaAssets
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
capacitor: {
|
|
37
|
-
folder: '/src-capacitor',
|
|
38
|
-
assets: capacitorAssets
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
electron: {
|
|
42
|
-
folder: '/src-electron',
|
|
43
|
-
assets: electronAssets
|
|
44
|
-
}
|
|
45
|
-
}
|