@quasar/icongenie 2.5.2 → 2.5.4
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/bin/icongenie +1 -1
- package/lib/cmd/generate.js +178 -161
- package/{bin/icongenie-help → lib/cmd/help.js} +1 -2
- package/lib/cmd/profile.js +143 -56
- package/lib/cmd/verify.js +90 -139
- package/lib/mount/mount-cordova.js +7 -0
- package/lib/runner/generate.js +171 -0
- package/lib/runner/profile.js +69 -0
- package/lib/runner/verify.js +148 -0
- package/lib/utils/parse-argv.js +24 -6
- package/package.json +1 -1
- package/bin/icongenie-generate +0 -189
- package/bin/icongenie-profile +0 -150
- package/bin/icongenie-verify +0 -100
package/bin/icongenie
CHANGED
package/lib/cmd/generate.js
CHANGED
|
@@ -1,171 +1,188 @@
|
|
|
1
|
-
const { existsSync } = require('fs')
|
|
2
|
-
const { ensureFileSync } = require('fs-extra')
|
|
3
|
-
const { green, gray } = require('kolorist')
|
|
4
1
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const
|
|
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
|
-
Splashscreen icon ratio... ${green(params.splashscreenIconRatio)}%
|
|
35
|
-
==========================
|
|
36
|
-
`)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function parseAssets (assets, include) {
|
|
40
|
-
let files = []
|
|
41
|
-
let assetsOf = []
|
|
42
|
-
|
|
43
|
-
if (include) {
|
|
44
|
-
const embeddedModes = include.filter(
|
|
45
|
-
mode => existsSync(resolveDir(modes[mode].folder))
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
embeddedModes.forEach(mode => {
|
|
49
|
-
files = files.concat(
|
|
50
|
-
getAssetsFiles(modes[mode].assets)
|
|
51
|
-
)
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
assetsOf = assetsOf.concat(embeddedModes)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (assets && assets.length > 0) {
|
|
58
|
-
files = files.concat(getAssetsFiles(assets))
|
|
59
|
-
assetsOf.push('profile')
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
files,
|
|
64
|
-
assetsOf: assetsOf.join(' | ')
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function getUniqueFiles (files) {
|
|
69
|
-
const filePaths = {}
|
|
70
|
-
const uniqueFiles = []
|
|
71
|
-
|
|
72
|
-
files.forEach(file => {
|
|
73
|
-
if (filePaths[file.absoluteName] === void 0) {
|
|
74
|
-
filePaths[file.absoluteName] = true
|
|
75
|
-
uniqueFiles.push(file)
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
return uniqueFiles
|
|
2
|
+
const parseArgs = require('minimist')
|
|
3
|
+
const processArgv = process.argv.slice(2)
|
|
4
|
+
|
|
5
|
+
const argv = parseArgs(processArgv, {
|
|
6
|
+
alias: {
|
|
7
|
+
p: 'profile', // config file
|
|
8
|
+
i: 'icon',
|
|
9
|
+
b: 'background',
|
|
10
|
+
m: 'mode',
|
|
11
|
+
f: 'filter',
|
|
12
|
+
q: 'quality',
|
|
13
|
+
h: 'help'
|
|
14
|
+
},
|
|
15
|
+
boolean: [ 'h', 'skip-trim' ],
|
|
16
|
+
string: [
|
|
17
|
+
'p', 'i', 'b', 'm', 'f', 'q',
|
|
18
|
+
'padding',
|
|
19
|
+
'theme-color',
|
|
20
|
+
'png-color',
|
|
21
|
+
'splashscreen-color',
|
|
22
|
+
'svg-color',
|
|
23
|
+
'splashscreen-icon-ratio'
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
// if user hasn't explicitly specified this, then
|
|
28
|
+
// we shouldn't take it into account
|
|
29
|
+
if (processArgv.includes('--skip-trim') === false) {
|
|
30
|
+
delete argv['skip-trim']
|
|
80
31
|
}
|
|
81
32
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
33
|
+
const { green } = require('kolorist')
|
|
34
|
+
|
|
35
|
+
if (argv.help) {
|
|
36
|
+
const modes = Object.keys(require('../modes')).join('|')
|
|
37
|
+
const generators = Object.keys(require('../generators')).join('|')
|
|
38
|
+
const defaultParams = require('../utils/default-params')
|
|
39
|
+
|
|
40
|
+
console.log(`
|
|
41
|
+
Description
|
|
42
|
+
Generate App icons & splashscreens
|
|
43
|
+
|
|
44
|
+
Usage
|
|
45
|
+
$ icongenie generate [options]
|
|
46
|
+
|
|
47
|
+
# generate icons for all installed Quasar modes
|
|
48
|
+
$ icongenie generate -i /path/to/icon.png
|
|
49
|
+
$ icongenie g -i /path/to/icon.png
|
|
50
|
+
|
|
51
|
+
# generate for (as example) PWA mode only
|
|
52
|
+
$ icongenie generate -m pwa --icon /path/to/icon.png
|
|
53
|
+
|
|
54
|
+
# generate for (as example) Cordova & Capacitor mode only
|
|
55
|
+
$ icongenie g -m cordova,capacitor -i
|
|
56
|
+
/path/to/icon.png -b /path/to/background.png
|
|
57
|
+
|
|
58
|
+
# generate by using a profile file
|
|
59
|
+
$ icongenie generate -p ./icongenie-profile.json
|
|
60
|
+
|
|
61
|
+
# generate by using batch of profile files
|
|
62
|
+
$ icongenie generate -p ./folder-containing-profile-files
|
|
63
|
+
|
|
64
|
+
Options
|
|
65
|
+
--icon, -i ${green('Required')};
|
|
66
|
+
Path to source file for icon; must be:
|
|
67
|
+
- a .png file
|
|
68
|
+
- min resolution: 64x64 px (the higher the better!!)
|
|
69
|
+
- with transparency
|
|
70
|
+
Best results are with a square image (height = width)
|
|
71
|
+
Image will be trimmed automatically
|
|
72
|
+
(also see "skip-trim" and "padding" param)
|
|
73
|
+
Path can be absolute, or relative to the root of the
|
|
74
|
+
Quasar project folder
|
|
75
|
+
Recommended min size: 1024x1024 px
|
|
76
|
+
|
|
77
|
+
--background, -b Path to optional background source file (for splashscreens);
|
|
78
|
+
must be:
|
|
79
|
+
- a .png file
|
|
80
|
+
- min resolution: 128x128 px (the higher the better!!)
|
|
81
|
+
- transparency is optional (but recommended if you
|
|
82
|
+
combine with the splashscreen-color param)
|
|
83
|
+
Path can be absolute, or relative to the root of the
|
|
84
|
+
Quasar project folder
|
|
85
|
+
Recommended min size: 1024x1024 px
|
|
86
|
+
|
|
87
|
+
--mode, -m For which Quasar mode(s) to generate the assets;
|
|
88
|
+
Default: all
|
|
89
|
+
[all|${modes}]
|
|
90
|
+
Multiple can be specified, separated by ",":
|
|
91
|
+
spa,cordova
|
|
92
|
+
|
|
93
|
+
--filter, -f Filter the available generators; when used, it can
|
|
94
|
+
generate only one type of asset instead of all
|
|
95
|
+
[${generators}]
|
|
96
|
+
|
|
97
|
+
--quality Quality of the files [1 - 12] (default: ${defaultParams.quality})
|
|
98
|
+
- higher quality --> bigger filesize & slower to create
|
|
99
|
+
- lower quality --> smaller filesize & faster to create
|
|
100
|
+
|
|
101
|
+
--skip-trim Do not trim the icon source file
|
|
102
|
+
|
|
103
|
+
--padding Apply fixed padding to the icon after trimming it;
|
|
104
|
+
Syntax: <horiz: number>,<vert: number>
|
|
105
|
+
Default: 0,0
|
|
106
|
+
Example: "--padding 10,5" means apply 10px padding to top
|
|
107
|
+
10px to bottom, 5px to left side and 5px to rightside
|
|
108
|
+
|
|
109
|
+
--theme-color Theme color to use for all generators requiring a color;
|
|
110
|
+
It gets overridden if any generator color is also specified;
|
|
111
|
+
The color must be in hex format (NOT hexa) without the leading
|
|
112
|
+
'#' character. Transparency not allowed.
|
|
113
|
+
Examples: 1976D2, eee
|
|
114
|
+
|
|
115
|
+
--svg-color Color to use for the generated monochrome svgs
|
|
116
|
+
Default (if no theme-color is specified): ${defaultParams.svgColor.slice(1)}
|
|
117
|
+
The color must be in hex format (NOT hexa) without the leading
|
|
118
|
+
'#' character. Transparency not allowed.
|
|
119
|
+
Examples: 1976D2, eee
|
|
120
|
+
|
|
121
|
+
--png-color Background color to use for the png generator, when
|
|
122
|
+
"background: true" in the asset definition (like for
|
|
123
|
+
the cordova/capacitor iOS icons);
|
|
124
|
+
Default (if no theme-color is specified): ${defaultParams.pngColor.slice(1)}
|
|
125
|
+
The color must be in hex format (NOT hexa) without the leading
|
|
126
|
+
'#' character. Transparency not allowed.
|
|
127
|
+
Examples: 1976D2, eee
|
|
128
|
+
|
|
129
|
+
--splashscreen-color Background color to use for the splashscreen generator;
|
|
130
|
+
Default (if no theme-color is specified): ${defaultParams.splashscreenColor.slice(1)}
|
|
131
|
+
The color must be in hex format (NOT hexa) without the leading
|
|
132
|
+
'#' character. Transparency not allowed.
|
|
133
|
+
Examples: 1976D2, eee
|
|
134
|
+
|
|
135
|
+
--splashscreen-icon-ratio Ratio of icon size in respect to the width or height
|
|
136
|
+
(whichever is smaller) of the resulting splashscreen;
|
|
137
|
+
Represents percentages; Valid values: 0 - 100
|
|
138
|
+
If 0 then it doesn't add the icon of top of background
|
|
139
|
+
Default: ${defaultParams.splashscreenIconRatio}
|
|
140
|
+
|
|
141
|
+
--profile, -p Use JSON profile file(s):
|
|
142
|
+
- path to folder (absolute or relative to current folder)
|
|
143
|
+
that contains JSON profile files (icongenie-*.json)
|
|
144
|
+
- path to a single *.json profile file (absolute or relative
|
|
145
|
+
to current folder)
|
|
146
|
+
Structure of a JSON profile file:
|
|
147
|
+
{
|
|
148
|
+
"params": {
|
|
149
|
+
"include": [ ... ], /* optional */
|
|
150
|
+
...
|
|
151
|
+
},
|
|
152
|
+
"assets": [ /* list of custom assets */ ]
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
--help, -h Displays this message
|
|
156
|
+
`)
|
|
157
|
+
process.exit(0)
|
|
96
158
|
}
|
|
97
159
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
160
|
+
const parseArgv = require('../utils/parse-argv')
|
|
161
|
+
const generate = require('../runner/generate')
|
|
162
|
+
const getProfileFiles = require('../utils/get-profile-files')
|
|
163
|
+
const filterArgvParams = require('../utils/filter-argv-params')
|
|
164
|
+
const { log } = require('../utils/logger')
|
|
165
|
+
|
|
166
|
+
async function runProfiles (params, profileFiles) {
|
|
167
|
+
for (let i = 0; i < profileFiles.length; i++) {
|
|
168
|
+
const profile = profileFiles[i]
|
|
169
|
+
|
|
170
|
+
console.log(`\n`)
|
|
171
|
+
log(`---------------------`)
|
|
172
|
+
log(`Generating by profile: ${profile}`)
|
|
173
|
+
log(`---------------------`)
|
|
174
|
+
console.log(`\n`)
|
|
175
|
+
|
|
176
|
+
await generate({ ...params, profile })
|
|
114
177
|
}
|
|
115
|
-
|
|
116
|
-
printBanner(assetsOf, params)
|
|
117
|
-
|
|
118
|
-
return Promise
|
|
119
|
-
.all(uniqueFiles.map(file => generateFile(file, fileOptions)))
|
|
120
|
-
.then(() => { mount(uniqueFiles) })
|
|
121
|
-
.then(() => uniqueFiles.length)
|
|
122
178
|
}
|
|
123
179
|
|
|
124
|
-
|
|
125
|
-
const profile = {
|
|
126
|
-
params: {},
|
|
127
|
-
assets: []
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (argv.profile) {
|
|
131
|
-
parseArgv(argv, [ 'profile' ])
|
|
132
|
-
|
|
133
|
-
const userProfile = getProfileContent(argv.profile)
|
|
134
|
-
|
|
135
|
-
if (userProfile.params) {
|
|
136
|
-
const { profile: _, ...params } = argv
|
|
180
|
+
const params = filterArgvParams(argv)
|
|
137
181
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
parseArgv(argv, [ 'mode' ])
|
|
147
|
-
|
|
148
|
-
const { mode, ...params } = argv
|
|
149
|
-
|
|
150
|
-
profile.params = params
|
|
151
|
-
profile.params.include = mode
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
profile.params = mergeObjects({}, profile.params)
|
|
155
|
-
|
|
156
|
-
parseArgv(profile.params, [
|
|
157
|
-
'quality', 'filter', 'padding',
|
|
158
|
-
'icon', 'background',
|
|
159
|
-
'splashscreenIconRatio',
|
|
160
|
-
// order matters:
|
|
161
|
-
'themeColor', 'pngColor', 'splashscreenColor', 'svgColor'
|
|
162
|
-
])
|
|
163
|
-
|
|
164
|
-
// final thorough validation
|
|
165
|
-
validateProfileObject(profile)
|
|
166
|
-
|
|
167
|
-
return generateFromProfile(profile)
|
|
168
|
-
.then(numberOfFiles => {
|
|
169
|
-
console.log(`\n Task done - generated ${numberOfFiles} file(s)!\n`)
|
|
170
|
-
})
|
|
182
|
+
if (params.profile) {
|
|
183
|
+
parseArgv(params, [ 'profile' ])
|
|
184
|
+
runProfiles(params, getProfileFiles(params.profile))
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
generate(params)
|
|
171
188
|
}
|
package/lib/cmd/profile.js
CHANGED
|
@@ -1,62 +1,149 @@
|
|
|
1
|
-
const { resolve, dirname, basename } = require('path')
|
|
2
|
-
const { writeFileSync } = require('fs')
|
|
3
|
-
const { ensureDir } = require('fs-extra')
|
|
4
1
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
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
|
-
|
|
2
|
+
const parseArgs = require('minimist')
|
|
3
|
+
|
|
4
|
+
const argv = parseArgs(process.argv.slice(2), {
|
|
5
|
+
alias: {
|
|
6
|
+
o: 'output',
|
|
7
|
+
a: 'assets',
|
|
8
|
+
|
|
9
|
+
i: 'icon',
|
|
10
|
+
b: 'background',
|
|
11
|
+
f: 'filter',
|
|
12
|
+
q: 'quality',
|
|
13
|
+
h: 'help'
|
|
14
|
+
},
|
|
15
|
+
boolean: [ 'h', 'skip-trim' ],
|
|
16
|
+
string: [
|
|
17
|
+
'o', 'a',
|
|
18
|
+
'i', 'b', 'include', 'f', 'q',
|
|
19
|
+
'padding',
|
|
20
|
+
'theme-color',
|
|
21
|
+
'png-color',
|
|
22
|
+
'splashscreen-color',
|
|
23
|
+
'svg-color',
|
|
24
|
+
'splashscreen-icon-ratio'
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
if (argv.help) {
|
|
29
|
+
const modes = Object.keys(require('../modes')).join('|')
|
|
30
|
+
const generators = Object.keys(require('../generators')).join('|')
|
|
31
|
+
const defaultParams = require('../utils/default-params')
|
|
32
|
+
|
|
33
|
+
console.log(`
|
|
34
|
+
Description
|
|
35
|
+
Helper command to easily bootstrap Icon Genie profile files.
|
|
36
|
+
|
|
37
|
+
Usage
|
|
38
|
+
$ icongenie profile -o <filename> [options]
|
|
39
|
+
|
|
40
|
+
# supplying params list
|
|
41
|
+
$ icongenie profile -o <filename> --include pwa,spa --quality 7
|
|
42
|
+
|
|
43
|
+
# supplying assets based on Icon Genie's internal list
|
|
44
|
+
$ icongenie profile -o <filename> --assets spa,bex
|
|
45
|
+
|
|
46
|
+
Options
|
|
47
|
+
--output, -o Name of the new Icon Genie profile file
|
|
48
|
+
|
|
49
|
+
--assets, -a Prefill the assets Array with Icon Genie's
|
|
50
|
+
internal list, based on the modes that you indicate;
|
|
51
|
+
[all|${modes}]
|
|
52
|
+
Multiple can be specified, separated by ",":
|
|
53
|
+
spa,cordova
|
|
54
|
+
|
|
55
|
+
--icon, -i Path to source file for icons; must be:
|
|
56
|
+
- a .png file
|
|
57
|
+
- min resolution: 64x64 px (the higher the better!!)
|
|
58
|
+
- with transparency
|
|
59
|
+
Best results are with a square image (height = width)
|
|
60
|
+
Image will be trimmed automatically
|
|
61
|
+
(also see "skip-trim" and "padding" param)
|
|
62
|
+
Path can be absolute, or relative to the root of the
|
|
63
|
+
Quasar project folder
|
|
64
|
+
Recommended min size: 1024x1024 px
|
|
65
|
+
|
|
66
|
+
--background, -b Path to optional background source file (for splashscreens);
|
|
67
|
+
must be:
|
|
68
|
+
- a .png file
|
|
69
|
+
- min resolution: 128x128 px (the higher the better!!)
|
|
70
|
+
- transparency is optional (but recommended if you
|
|
71
|
+
combine with the splashscreen-color param)
|
|
72
|
+
Path can be absolute, or relative to the root of the
|
|
73
|
+
Quasar project folder
|
|
74
|
+
Recommended min size: 1024x1024 px
|
|
75
|
+
|
|
76
|
+
--include Prefill the params.include property;
|
|
77
|
+
[all|${modes}]
|
|
78
|
+
Multiple can be specified, separated by ",":
|
|
79
|
+
spa,cordova
|
|
80
|
+
|
|
81
|
+
--filter, -f Prefill the params.filter property;
|
|
82
|
+
[${generators}]
|
|
83
|
+
|
|
84
|
+
--quality Prefill in the params.quality property;
|
|
85
|
+
Quality of the files [1 - 12] (default: ${defaultParams.quality})
|
|
86
|
+
- higher quality --> bigger filesize & slower to create
|
|
87
|
+
- lower quality --> smaller filesize & faster to create
|
|
88
|
+
|
|
89
|
+
--skip-trim Do not trim the icon source file
|
|
90
|
+
|
|
91
|
+
--padding Apply fixed padding to the icon after trimming it;
|
|
92
|
+
Syntax: <horiz: number>,<vert: number>
|
|
93
|
+
Default: 0,0
|
|
94
|
+
Example: "--padding 10,5" means apply 10px padding to top
|
|
95
|
+
10px to bottom, 5px to left side and 5px to rightside
|
|
96
|
+
|
|
97
|
+
--theme-color Prefill the params.themeColor property;
|
|
98
|
+
Theme color to use for all generators requiring a color;
|
|
99
|
+
It gets overridden if any generator color is also specified;
|
|
100
|
+
The color must be in hex format (NOT hexa) without the leading
|
|
101
|
+
'#' character. Transparency not allowed.
|
|
102
|
+
Examples: 1976D2, eee
|
|
103
|
+
|
|
104
|
+
--svg-color Prefill the params.svgColor property;
|
|
105
|
+
Color to use for the generated monochrome svgs
|
|
106
|
+
Default (if no theme-color is specified): ${defaultParams.svgColor.slice(1)}
|
|
107
|
+
The color must be in hex format (NOT hexa) without the leading
|
|
108
|
+
'#' character. Transparency not allowed.
|
|
109
|
+
Examples: 1976D2, eee
|
|
110
|
+
|
|
111
|
+
--png-color Prefill the params.pngColor property;
|
|
112
|
+
Background color to use for the png generator, when
|
|
113
|
+
"background: true" in the asset definition (like for
|
|
114
|
+
the Cordova/Capacitor iOS icons);
|
|
115
|
+
Default (if no theme-color is specified): ${defaultParams.pngColor.slice(1)}
|
|
116
|
+
The color must be in hex format (NOT hexa) without the leading
|
|
117
|
+
'#' character. Transparency not allowed.
|
|
118
|
+
Examples: 1976D2, eee
|
|
119
|
+
|
|
120
|
+
--splashscreen-color Prefill the params.splashscreenColor property;
|
|
121
|
+
Background color to use for the splashscreen generator;
|
|
122
|
+
Default (if no theme-color is specified): ${defaultParams.splashscreenColor.slice(1)}
|
|
123
|
+
The color must be in hex format (NOT hexa) without the leading
|
|
124
|
+
'#' character. Transparency not allowed.
|
|
125
|
+
Examples: 1976D2, eee
|
|
126
|
+
|
|
127
|
+
--splashscreen-icon-ratio Prefill the params.splashscreenIconRatio property;
|
|
128
|
+
Ratio of icon size in respect to the width or height
|
|
129
|
+
(whichever is smaller) of the resulting splashscreen;
|
|
130
|
+
Represents percentages; Valid values: 0 - 100
|
|
131
|
+
If 0 then it doesn't add the icon of top of background
|
|
132
|
+
Default: ${defaultParams.splashscreenIconRatio}
|
|
133
|
+
`)
|
|
134
|
+
process.exit(0)
|
|
41
135
|
}
|
|
42
136
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
assets: getAssets(assets)
|
|
47
|
-
}
|
|
137
|
+
const profile = require('../runner/profile')
|
|
138
|
+
const filterArgvParams = require('../utils/filter-argv-params')
|
|
139
|
+
const parseArgv = require('../utils/parse-argv')
|
|
48
140
|
|
|
49
|
-
|
|
141
|
+
parseArgv(argv, [
|
|
142
|
+
'output',
|
|
143
|
+
'assets',
|
|
144
|
+
'padding'
|
|
145
|
+
])
|
|
50
146
|
|
|
51
|
-
|
|
52
|
-
const folderName = dirname(targetFile)
|
|
147
|
+
const params = filterArgvParams(argv)
|
|
53
148
|
|
|
54
|
-
|
|
55
|
-
ensureDir(folderName)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
writeFileSync(targetFile, JSON.stringify(profile, null, 2), 'utf-8')
|
|
59
|
-
|
|
60
|
-
console.log(` Generated Icon Genie profile file:`)
|
|
61
|
-
log(`${targetFile}\n`)
|
|
62
|
-
}
|
|
149
|
+
profile(params)
|