style: fmt rust code
This commit is contained in:
4
bin/cli.ts
vendored
4
bin/cli.ts
vendored
@@ -38,8 +38,8 @@ program
|
||||
.option('--iter-copy-file', 'Copy files when URL is a local file', DEFAULT.iterCopyFile)
|
||||
.option('--multi-arch', 'Only for Mac, supports both Intel and M1', DEFAULT.multiArch)
|
||||
.option('--targets <string>', 'Only for Linux, option "deb" or "appimage"', DEFAULT.targets)
|
||||
.option('--inject [injects...]', 'inject .js or .css for this app', DEFAULT.inject)
|
||||
.option('--safe-domain [domains...]', 'domains that can call window.__TAURI__ and use ipc', DEFAULT.safeDomain)
|
||||
.option('--inject [injects...]', 'Inject .js or .css for this app', DEFAULT.inject)
|
||||
.option('--safe-domain [domains...]', 'Please enter the security domains that need to be configured', DEFAULT.safeDomain)
|
||||
.option('--debug', 'Debug mode', DEFAULT.debug)
|
||||
.version(packageJson.version, '-v, --version', 'Output the current version')
|
||||
.action(async (url: string, options: PakeCliOptions) => {
|
||||
|
||||
5
bin/defaults.ts
vendored
5
bin/defaults.ts
vendored
@@ -22,7 +22,6 @@ export const DEFAULT_PAKE_OPTIONS: PakeCliOptions = {
|
||||
// just for cli development
|
||||
export const DEFAULT_DEV_PAKE_OPTIONS: PakeCliOptions & {url: string} = {
|
||||
...DEFAULT_PAKE_OPTIONS,
|
||||
url: 'https://zbook.lol',
|
||||
name: 'Zbook',
|
||||
safeDomain: ['zbook.eu.org']
|
||||
url: 'https://weread.qq.com',
|
||||
name: 'Weread',
|
||||
}
|
||||
2
bin/helpers/merge.ts
vendored
2
bin/helpers/merge.ts
vendored
@@ -184,7 +184,7 @@ export async function mergeConfig(url: string, options: PakeAppOptions, tauriCon
|
||||
}
|
||||
|
||||
tauriConf.tauri.systemTray.iconPath = trayIconPath;
|
||||
const injectFilePath = path.join(npmDirectory, `src-tauri/src/inject/_INJECT_.js`);
|
||||
const injectFilePath = path.join(npmDirectory, `src-tauri/src/inject/custom.js`);
|
||||
// inject js or css files
|
||||
if (inject?.length > 0) {
|
||||
if (!inject.every(item => item.endsWith('.css') || item.endsWith('.js'))) {
|
||||
|
||||
Reference in New Issue
Block a user