From 22e3efea493662faa70b6866dc8fb7d967695a8b Mon Sep 17 00:00:00 2001 From: Tw93 Date: Thu, 22 Jun 2023 17:10:41 +0800 Subject: [PATCH] :art: More simple --- bin/cli.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/bin/cli.ts b/bin/cli.ts index 9823b16..9f3311d 100644 --- a/bin/cli.ts +++ b/bin/cli.ts @@ -7,7 +7,7 @@ import BuilderProvider from './builders/BuilderProvider'; import { checkUpdateTips } from './helpers/updater'; import packageJson from '../package.json'; import { validateNumberInput, validateUrlInput } from './utils/validate'; -import { DEFAULT_PAKE_OPTIONS } from './defaults'; +import { DEFAULT_PAKE_OPTIONS as DEFAULT } from './defaults'; program .version(packageJson.version) @@ -17,20 +17,20 @@ program program .argument('[url]', 'The web URL you want to package', validateUrlInput) .option('--name ', 'Application name') - .option('--icon ', 'Application icon', DEFAULT_PAKE_OPTIONS.icon) - .option('--height ', 'Window height', validateNumberInput, DEFAULT_PAKE_OPTIONS.height) - .option('--width ', 'Window width', validateNumberInput, DEFAULT_PAKE_OPTIONS.width) - .option('--no-resizable', 'Whether the window can be resizable', DEFAULT_PAKE_OPTIONS.resizable) - .option('--fullscreen', 'Start the packaged app in full screen', DEFAULT_PAKE_OPTIONS.fullscreen) - .option('--transparent', 'Transparent title bar', DEFAULT_PAKE_OPTIONS.transparent) - .option('--user-agent ', 'Custom user agent', DEFAULT_PAKE_OPTIONS.userAgent) - .option('--show-menu', 'Show menu in app', DEFAULT_PAKE_OPTIONS.showMenu) - .option('--show-system-tray', 'Show system tray in app', DEFAULT_PAKE_OPTIONS.showSystemTray) - .option('--system-tray-icon ', 'Custom system tray icon', DEFAULT_PAKE_OPTIONS.systemTrayIcon) - .option('--iter-copy-file', 'Copy files to app when URL is a local file', DEFAULT_PAKE_OPTIONS.iterCopyFile) - .option('--multi-arch', 'Available for Mac only, supports both Intel and M1', DEFAULT_PAKE_OPTIONS.multiArch) - .option('--targets ', 'Only for Linux, option "deb", "appimage" or "all"', DEFAULT_PAKE_OPTIONS.targets) - .option('--debug', 'Debug mode', DEFAULT_PAKE_OPTIONS.debug) + .option('--icon ', 'Application icon', DEFAULT.icon) + .option('--height ', 'Window height', validateNumberInput, DEFAULT.height) + .option('--width ', 'Window width', validateNumberInput, DEFAULT.width) + .option('--no-resizable', 'Whether the window can be resizable', DEFAULT.resizable) + .option('--fullscreen', 'Start the packaged app in full screen', DEFAULT.fullscreen) + .option('--transparent', 'Transparent title bar', DEFAULT.transparent) + .option('--user-agent ', 'Custom user agent', DEFAULT.userAgent) + .option('--show-menu', 'Show menu in app', DEFAULT.showMenu) + .option('--show-system-tray', 'Show system tray in app', DEFAULT.showSystemTray) + .option('--system-tray-icon ', 'Custom system tray icon', DEFAULT.systemTrayIcon) + .option('--iter-copy-file', 'Copy files to app when URL is a local file', DEFAULT.iterCopyFile) + .option('--multi-arch', 'Available for Mac only, supports both Intel and M1', DEFAULT.multiArch) + .option('--targets ', 'Only for Linux, option "deb", "appimage" or "all"', DEFAULT.targets) + .option('--debug', 'Debug mode', DEFAULT.debug) .action(async (url: string, options: PakeCliOptions) => { //Check for update prompt