feat: 完善一波代码 & 支持win(待测试验证)
This commit is contained in:
4
bin/options/icon.ts
vendored
4
bin/options/icon.ts
vendored
@@ -5,7 +5,7 @@ import { dir } from 'tmp-promise';
|
||||
import path from 'path';
|
||||
import fs from 'fs/promises';
|
||||
import { fileURLToPath } from 'url';
|
||||
import log from 'loglevel';
|
||||
import logger from './logger.js';
|
||||
|
||||
export async function handleIcon(options: PakeAppOptions, url: string) {
|
||||
if (options.icon) {
|
||||
@@ -21,7 +21,7 @@ export async function handleIcon(options: PakeAppOptions, url: string) {
|
||||
}
|
||||
|
||||
export async function inferIcon(name: string, url: string) {
|
||||
log.info('You have not provided an app icon, use the default icon(can use --icon option to assign an icon)')
|
||||
logger.info('You have not provided an app icon, use the default icon.(use --icon option to assign an icon)')
|
||||
const npmDirectory = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
return path.join(npmDirectory, 'pake-default.icns');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user