Auto-fix formatting issues
This commit is contained in:
3
bin/helpers/merge.ts
vendored
3
bin/helpers/merge.ts
vendored
@@ -233,7 +233,8 @@ StartupNotify=true
|
||||
};
|
||||
const iconInfo = platformIconMap[platform];
|
||||
const resolvedIconPath = options.icon ? path.resolve(options.icon) : null;
|
||||
const exists = resolvedIconPath && (await fsExtra.pathExists(resolvedIconPath));
|
||||
const exists =
|
||||
resolvedIconPath && (await fsExtra.pathExists(resolvedIconPath));
|
||||
if (exists) {
|
||||
let updateIconPath = true;
|
||||
let customIconExt = path.extname(resolvedIconPath).toLowerCase();
|
||||
|
||||
4
bin/options/icon.ts
vendored
4
bin/options/icon.ts
vendored
@@ -46,7 +46,9 @@ const API_KEYS = {
|
||||
import { generateSafeFilename } from '@/utils/name';
|
||||
|
||||
function generateIconPath(appName: string, isDefault = false): string {
|
||||
const safeName = isDefault ? 'icon' : generateSafeFilename(appName).toLowerCase();
|
||||
const safeName = isDefault
|
||||
? 'icon'
|
||||
: generateSafeFilename(appName).toLowerCase();
|
||||
const baseName = safeName;
|
||||
|
||||
if (IS_WIN) {
|
||||
|
||||
10
bin/utils/name.ts
vendored
10
bin/utils/name.ts
vendored
@@ -15,9 +15,7 @@ export function generateLinuxPackageName(name: string): string {
|
||||
}
|
||||
|
||||
export function generateIdentifierSafeName(name: string): string {
|
||||
return name
|
||||
.replace(/[^a-zA-Z0-9]/g, '')
|
||||
.toLowerCase();
|
||||
return name.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
|
||||
}
|
||||
|
||||
export function generateWindowsFilename(name: string): string {
|
||||
@@ -28,7 +26,5 @@ export function generateWindowsFilename(name: string): string {
|
||||
}
|
||||
|
||||
export function generateMacOSFilename(name: string): string {
|
||||
return name
|
||||
.replace(/[:]/g, '_')
|
||||
.slice(0, 255);
|
||||
}
|
||||
return name.replace(/[:]/g, '_').slice(0, 255);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user