优化配套pake-cli命令1文档

This commit is contained in:
Tlntin
2022-12-28 23:53:18 +08:00
parent 1504149635
commit 88f3a9ada6
4 changed files with 130 additions and 9 deletions

51
dist/cli.js vendored
View File

@@ -1709,6 +1709,17 @@ function mergeTauriConfig(url, options, tauriConf) {
tauriConf.pake.user_agent.macos = true;
}
}
else {
if (process.platform === "win32") {
tauriConf.pake.menu.windows = false;
}
if (process.platform === "linux") {
tauriConf.pake.menu.linux = false;
}
if (process.platform === "darwin") {
tauriConf.pake.user_agent.macos = false;
}
}
// 处理托盘
if (showSystemTray) {
if (process.platform === "win32") {
@@ -1721,6 +1732,17 @@ function mergeTauriConfig(url, options, tauriConf) {
tauriConf.pake.system_tray.macos = true;
}
}
else {
if (process.platform === "win32") {
tauriConf.pake.system_tray.windows = false;
}
if (process.platform === "linux") {
tauriConf.pake.system_tray.linux = false;
}
if (process.platform === "darwin") {
tauriConf.pake.system_tray.macos = false;
}
}
tauriConf.package.productName = name;
tauriConf.tauri.bundle.identifier = identifier;
// 处理应用图标
@@ -1977,22 +1999,29 @@ var tauri$3 = {
active: false
},
systemTray: {
iconPath: "/home/tlntin/data/code/rust_study/Pake/src-tauri/png/code_512.png",
iconPath: "png/weread_512.png",
iconAsTemplate: true
}
};
var build = {
devPath: "../dist",
distDir: "../dist",
beforeBuildCommand: "",
beforeDevCommand: ""
};
var CommonConf = {
"package": {
productName: "baidu",
productName: "WeRead",
version: "1.0.0"
},
tauri: tauri$3
tauri: tauri$3,
build: build
};
var windows = [
{
url: "https://www.baidu.com",
transparent: false,
url: "https://weread.qq.com/",
transparent: true,
fullscreen: false,
width: 1200,
height: 780,
@@ -2007,7 +2036,7 @@ var user_agent = {
};
var menu = {
macos: true,
linux: true,
linux: false,
windows: false
};
var system_tray = {
@@ -2094,9 +2123,10 @@ var MacConf = {
var tauri = {
bundle: {
icon: [
"/home/tlntin/data/code/rust_study/Pake/src-tauri/png/code_512.png"
"png/weread_256.ico",
"png/weread_512.png"
],
identifier: "pake-f9751d",
identifier: "com.tw93.weread",
active: true,
category: "DeveloperTool",
copyright: "",
@@ -2112,7 +2142,10 @@ var tauri = {
"librsvg2-dev",
"gnome-video-effects",
"gnome-video-effects-extra"
]
],
files: {
"/usr/share/applications/com-tw93-weread.desktop": "assets/com-tw93-weread.desktop"
}
},
externalBin: [
],