优化配套pake-cli命令1文档
This commit is contained in:
32
bin/README.md
vendored
32
bin/README.md
vendored
@@ -88,3 +88,35 @@ url 为你需要打包的网页链接 🔗,必须提供。
|
||||
```shell
|
||||
--fullscreen <value>
|
||||
```
|
||||
|
||||
#### [user-agent]
|
||||
|
||||
自定义浏览器请求头, 默认为空。
|
||||
|
||||
```shell
|
||||
--user-agent <value>
|
||||
```
|
||||
|
||||
#### [show-menu]
|
||||
|
||||
显示菜单栏, 默认不显示
|
||||
|
||||
```shell
|
||||
--show-menu
|
||||
```
|
||||
|
||||
#### [show-system-tray]
|
||||
|
||||
显示通知栏托盘, 默认不显示
|
||||
|
||||
```shell
|
||||
--show-system-tray <value>
|
||||
```
|
||||
|
||||
#### [system-tray-icon]
|
||||
|
||||
通知栏托盘图标,仅当显示通知栏托盘时有效, 图标必须为.ico或者.png格式的,512*512像素的图片。
|
||||
|
||||
```shell
|
||||
--system-tray-icon <value>
|
||||
```
|
||||
32
bin/README_EN.md
vendored
32
bin/README_EN.md
vendored
@@ -87,3 +87,35 @@ Whether to open the full screen after opening the application. The default is `f
|
||||
```shell
|
||||
--fullscreen <value>
|
||||
```
|
||||
|
||||
#### [user-agent]
|
||||
|
||||
Custom browser user agent, default is empty.
|
||||
|
||||
```shell
|
||||
--user-agent <value>
|
||||
```
|
||||
|
||||
#### [show-menu]
|
||||
|
||||
Display the menu bar, not display it by default.
|
||||
|
||||
```shell
|
||||
--show-menu
|
||||
```
|
||||
|
||||
#### [show-system-tray]
|
||||
|
||||
Display the notification tray, not display it by default.
|
||||
|
||||
```shell
|
||||
--show-system-tray <value>
|
||||
```
|
||||
|
||||
#### [system-tray-icon]
|
||||
|
||||
The notification tray icon is only valid when the notification tray is displayed. The icon must be a 512*512 pixel image in .ico or .png format.
|
||||
|
||||
```shell
|
||||
--system-tray-icon <value>
|
||||
```
|
||||
|
||||
24
bin/builders/common.ts
vendored
24
bin/builders/common.ts
vendored
@@ -119,6 +119,18 @@ export async function mergeTauriConfig(
|
||||
if (process.platform === "darwin") {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
// 处理托盘
|
||||
@@ -134,6 +146,18 @@ export async function mergeTauriConfig(
|
||||
if (process.platform === "darwin") {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user