mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
Fix lint
This commit is contained in:
parent
9b52f210db
commit
5ea4638aea
@ -26,9 +26,7 @@ function iconIsIcns(iconPath: string): boolean {
|
|||||||
* Will convert a `.png` icon to the appropriate arch format (if necessary),
|
* Will convert a `.png` icon to the appropriate arch format (if necessary),
|
||||||
* and return adjusted options
|
* and return adjusted options
|
||||||
*/
|
*/
|
||||||
export async function convertIconIfNecessary(
|
export function convertIconIfNecessary(options: AppOptions): void {
|
||||||
options: AppOptions,
|
|
||||||
): Promise<void> {
|
|
||||||
if (!options.packager.icon) {
|
if (!options.packager.icon) {
|
||||||
log.debug('Option "icon" not set, skipping icon conversion.');
|
log.debug('Option "icon" not set, skipping icon conversion.');
|
||||||
return;
|
return;
|
||||||
@ -43,7 +41,7 @@ export async function convertIconIfNecessary(
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const iconPath = await convertToIco(options.packager.icon);
|
const iconPath = convertToIco(options.packager.icon);
|
||||||
options.packager.icon = iconPath;
|
options.packager.icon = iconPath;
|
||||||
return;
|
return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -61,7 +59,7 @@ export async function convertIconIfNecessary(
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const iconPath = await convertToPng(options.packager.icon);
|
const iconPath = convertToPng(options.packager.icon);
|
||||||
options.packager.icon = iconPath;
|
options.packager.icon = iconPath;
|
||||||
return;
|
return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -85,7 +83,7 @@ export async function convertIconIfNecessary(
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const iconPath = await convertToIcns(options.packager.icon);
|
const iconPath = convertToIcns(options.packager.icon);
|
||||||
options.packager.icon = iconPath;
|
options.packager.icon = iconPath;
|
||||||
return;
|
return;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -112,7 +112,7 @@ export async function buildNativefierApp(
|
|||||||
|
|
||||||
log.info('\nConverting icons...');
|
log.info('\nConverting icons...');
|
||||||
options.packager.dir = tmpPath; // const optionsWithTmpPath = { ...options, dir: tmpPath };
|
options.packager.dir = tmpPath; // const optionsWithTmpPath = { ...options, dir: tmpPath };
|
||||||
await convertIconIfNecessary(options);
|
convertIconIfNecessary(options);
|
||||||
await copyIconsIfNecessary(options, tmpPath);
|
await copyIconsIfNecessary(options, tmpPath);
|
||||||
|
|
||||||
log.info(
|
log.info(
|
||||||
|
Loading…
Reference in New Issue
Block a user