Pake网页打包成桌面程序
npm install -g pake-cli
打包命令 pake https://www.baidu.com --name baidu
核心参数详解
参数 | 缩写 | 说明 | 示例 |
---|---|---|---|
--name |
-n |
设置应用名称(默认取自网页标题) | pake https://example.com -n "MyApp" |
--icon |
-i |
自定义应用图标(支持 .ico /.png ) |
pake https://example.com -i icon.png |
--width |
-w |
设置窗口初始宽度(像素) | pake https://example.com -w 800 |
--height |
-h |
设置窗口初始高度(像素) | pake https://example.com -h 600 |
--fullscreen |
-f |
启动时全屏 | pake https://example.com -f |
--transparent |
-t |
启用透明窗口(需网页支持) | pake https://example.com -t |
--user-agent |
-u |
自定义 User-Agent | pake https://example.com -u "Mozilla/5.0" |
--hide-menu-bar |
-m |
隐藏菜单栏 | pake https://example.com -m |
--disable-context-menu |
-c |
禁用右键菜单 | pake https://example.com -c |
--multi-arch |
-a |
打包多架构版本(如 ARM/x64) | pake https://example.com -a |
--output |
-o |
指定输出目录 | pake https://example.com -o ./dist |
高级参数
参数 | 说明 | 示例 |
---|---|---|
--inject |
注入自定义 JS/CSS 文件 | pake https://example.com --inject script.js |
--debug |
启用调试模式(显示控制台) | pake https://example.com --debug |
--no-sandbox |
禁用 Chromium 沙盒(兼容性选项) | pake https://example.com --no-sandbox |
--version |
显示 Pake 版本 | pake --version |
pake https://www.baidu.com --multi-instance --name baidu
评论区