pake-cli 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -69
- package/dist/cli.js +40 -18
- package/package.json +2 -2
- package/src-tauri/src/pake.js +2 -1
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
<h4 align="right"><strong
|
|
1
|
+
<h4 align="right"><strong>English</strong> | <a href="https://github.com/tw93/Pake/blob/master/README_CN.md">简体中文</a></h4>
|
|
2
2
|
<p align="center">
|
|
3
3
|
<img src=https://gw.alipayobjects.com/zos/k/fa/logo-modified.png width=138/>
|
|
4
4
|
</p>
|
|
5
5
|
<h1 align="center">Pake</h1>
|
|
6
|
+
<p align="center"><strong>Turn any webpage into a desktop app with Rust <em>with ease</em>.</strong></p>
|
|
6
7
|
<div align="center">
|
|
7
8
|
<a href="https://twitter.com/HiTw93" target="_blank">
|
|
8
|
-
<img alt="twitter" src="https://img.shields.io/
|
|
9
|
+
<img alt="twitter" src="https://img.shields.io/badge/follow-Tw93-red?style=flat-square&logo=Twitter"></a>
|
|
9
10
|
<a href="https://t.me/miaoyan" target="_blank">
|
|
10
11
|
<img alt="telegram" src="https://img.shields.io/badge/chat-telegram-blueviolet?style=flat-square&logo=Telegram"></a>
|
|
11
12
|
<a href="https://github.com/tw93/Pake/releases" target="_blank">
|
|
@@ -15,25 +16,26 @@
|
|
|
15
16
|
<a href="https://github.com/tw93/Pake/issues?q=is%3Aissue+is%3Aclosed" target="_blank">
|
|
16
17
|
<img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed/tw93/Pake.svg?style=flat-square"></a>
|
|
17
18
|
</div>
|
|
18
|
-
<div align="left">很简单的用 Rust 打包网页生成很小的桌面 App,支持 Mac / Windows / Linux 系统,常用包下载、<a href="#命令行一键打包">命令行一键打包</a>、<a href="#定制开发">定制开发</a> 可见下面文档,也欢迎去 <a href=https://github.com/tw93/Pake/discussions>讨论区</a> 交流。</div>
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
<div align="left">Pake supports Mac, Windows, and Linux. Check out README for <a href="#popular-packages">Popular Packages</a>, <a href="#command-line-packaging">Command-Line Packaging</a>, and <a href="#development">Customized Development</a> information. Feel free to share your suggestions in <a href=https://github.com/tw93/Pake/discussions>Discussions</a>.</div>
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
😂 **快**:Pake 的底层使用的 Rust Tauri 框架,性能体验较 JS 框架要轻快不少,内存小很多。
|
|
24
|
-
🩴 **特**:不是单纯打包,实现了快捷键的透传、沉浸式的窗口、拖动、样式改写、去广告、产品的极简风格定制。
|
|
25
|
-
🐶 **玩**:只是一个很简单的小玩具,用 Rust 替代之前套壳网页打包的老思路,其实 PWA 也很好。
|
|
22
|
+
## Features
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
- 🎐 Nearly 40 times smaller than an Electron package (less than 3M!)
|
|
25
|
+
- 🚀 With Rust Tauri, Pake is much more lightweight and faster than JS-based frameworks.
|
|
26
|
+
- 📦 Battery-included package — shortcut pass-through, immersive windows, and minimalist customization.
|
|
27
|
+
- 👻 Pake is just a simple tool — replace the old bundle approach with Rust (though PWA is good enough).
|
|
28
|
+
|
|
29
|
+
## Popular Packages
|
|
28
30
|
|
|
29
31
|
<table>
|
|
30
32
|
<tr>
|
|
31
|
-
<td>WeRead
|
|
33
|
+
<td>WeRead
|
|
32
34
|
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead.dmg">Mac</a>
|
|
33
35
|
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead_x64.msi">Windows</a>
|
|
34
36
|
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead_amd64.deb">Linux</a>
|
|
35
37
|
</td>
|
|
36
|
-
<td>Twitter
|
|
38
|
+
<td>Twitter
|
|
37
39
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter.dmg">Mac</a>
|
|
38
40
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter_x64.msi">Windows</a>
|
|
39
41
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter_amd64.deb">Linux</a>
|
|
@@ -44,12 +46,12 @@
|
|
|
44
46
|
<td><img src=https://cdn.fliggy.com/upic/mc41xq.jpg width=600/></td>
|
|
45
47
|
</tr>
|
|
46
48
|
<tr>
|
|
47
|
-
<td>LiZhi
|
|
49
|
+
<td>LiZhi
|
|
48
50
|
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi.dmg">Mac</a>
|
|
49
51
|
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi_x64.msi">Windows</a>
|
|
50
52
|
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi_amd64.deb">Linux</a>
|
|
51
53
|
</td>
|
|
52
|
-
<td>YouTube
|
|
54
|
+
<td>YouTube
|
|
53
55
|
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube.dmg">Mac</a>
|
|
54
56
|
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube_x64.msi">Windows</a>
|
|
55
57
|
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube_amd64.deb">Linux</a>
|
|
@@ -60,12 +62,12 @@
|
|
|
60
62
|
<td><img src=https://cdn.fliggy.com/upic/Ea5ZRw.png width=600/></td>
|
|
61
63
|
</tr>
|
|
62
64
|
<tr>
|
|
63
|
-
<td>Qwerty
|
|
65
|
+
<td>Qwerty
|
|
64
66
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty.dmg">Mac</a>
|
|
65
67
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_x64.msi">Windows</a>
|
|
66
68
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_amd64.deb">Linux</a>
|
|
67
69
|
</td>
|
|
68
|
-
<td>Reference
|
|
70
|
+
<td>Reference
|
|
69
71
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference.dmg">Mac</a>
|
|
70
72
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference_x64.msi">Windows</a>
|
|
71
73
|
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference_amd64.deb">Linux</a>
|
|
@@ -75,104 +77,101 @@
|
|
|
75
77
|
<td><img src=https://cdn.fliggy.com/upic/CJjagn.jpg width=600/></td>
|
|
76
78
|
<td><img src=https://cdn.fliggy.com/upic/KFsZIY.png width=600/></td>
|
|
77
79
|
</tr>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
<tr>
|
|
81
|
+
<td>Book
|
|
80
82
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary.dmg">Mac</a>
|
|
81
83
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary_x64.msi">Windows</a>
|
|
82
84
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary_amd64.deb">Linux</a>
|
|
83
85
|
</td>
|
|
84
|
-
<td>ChatGPT
|
|
86
|
+
<td>ChatGPT
|
|
85
87
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT.dmg">Mac</a>
|
|
86
88
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT_x64.msi">Windows</a>
|
|
87
89
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT_amd64.deb">Linux</a>
|
|
88
90
|
</td>
|
|
89
91
|
</tr>
|
|
90
92
|
<tr>
|
|
91
|
-
<td><img src=https://cdn.fliggy.com/upic/
|
|
93
|
+
<td><img src=https://cdn.fliggy.com/upic/lJiTRc.jpg width=600/></td>
|
|
92
94
|
<td><img src=https://cdn.fliggy.com/upic/sfnTXf.png width=600/></td>
|
|
93
95
|
</tr>
|
|
94
96
|
</table>
|
|
95
97
|
|
|
96
98
|
<details>
|
|
97
|
-
|
|
98
|
-
<summary>🏂 更多应用如 Flomo / 语雀 / RunCode 可去 <a href="https://github.com/tw93/Pake/releases">Release</a>下载,<b>此外点击可展开快捷键说明</b></summary>
|
|
99
|
+
<summary>🏂 You can download more applications (such as Flomo / YuQue / RunCode) from <a href="https://github.com/tw93/Pake/releases">Releases</a>. <b>Click here to expand the shortcuts reference!</b></summary>
|
|
99
100
|
|
|
100
101
|
<br/>
|
|
101
102
|
|
|
102
|
-
| Mac | Windows/Linux |
|
|
103
|
-
| --------------------------- | ------------------------------ |
|
|
104
|
-
| <kbd>⌘</kbd> + <kbd>[</kbd> | <kbd>Ctrl</kbd> + <kbd>←</kbd> |
|
|
105
|
-
| <kbd>⌘</kbd> + <kbd>]</kbd> | <kbd>Ctrl</kbd> + <kbd>→</kbd> |
|
|
106
|
-
| <kbd>⌘</kbd> + <kbd>↑</kbd> | <kbd>Ctrl</kbd> + <kbd>↑</kbd> |
|
|
107
|
-
| <kbd>⌘</kbd> + <kbd>↓</kbd> | <kbd>Ctrl</kbd> + <kbd>↓</kbd> |
|
|
108
|
-
| <kbd>⌘</kbd> + <kbd>r</kbd> | <kbd>Ctrl</kbd> + <kbd>r</kbd> |
|
|
109
|
-
| <kbd>⌘</kbd> + <kbd>w</kbd> | <kbd>Ctrl</kbd> + <kbd>w</kbd> |
|
|
110
|
-
| <kbd>⌘</kbd> + <kbd>-</kbd> | <kbd>Ctrl</kbd> + <kbd>-</kbd> |
|
|
111
|
-
| <kbd>⌘</kbd> + <kbd>+</kbd> | <kbd>Ctrl</kbd> + <kbd>+</kbd> |
|
|
112
|
-
| <kbd>⌘</kbd> + <kbd>=</kbd> | <kbd>Ctrl</kbd> + <kbd>=</kbd> |
|
|
113
|
-
| <kbd>⌘</kbd> + <kbd>0</kbd> | <kbd>Ctrl</kbd> + <kbd>0</kbd> |
|
|
114
|
-
|
|
115
|
-
|
|
103
|
+
| Mac | Windows/Linux | Function |
|
|
104
|
+
| --------------------------- | ------------------------------ | ----------------------------- |
|
|
105
|
+
| <kbd>⌘</kbd> + <kbd>[</kbd> | <kbd>Ctrl</kbd> + <kbd>←</kbd> | Return to the previous page |
|
|
106
|
+
| <kbd>⌘</kbd> + <kbd>]</kbd> | <kbd>Ctrl</kbd> + <kbd>→</kbd> | Go to the next page |
|
|
107
|
+
| <kbd>⌘</kbd> + <kbd>↑</kbd> | <kbd>Ctrl</kbd> + <kbd>↑</kbd> | Auto scroll to top of page |
|
|
108
|
+
| <kbd>⌘</kbd> + <kbd>↓</kbd> | <kbd>Ctrl</kbd> + <kbd>↓</kbd> | Auto scroll to bottom of page |
|
|
109
|
+
| <kbd>⌘</kbd> + <kbd>r</kbd> | <kbd>Ctrl</kbd> + <kbd>r</kbd> | Refresh Page |
|
|
110
|
+
| <kbd>⌘</kbd> + <kbd>w</kbd> | <kbd>Ctrl</kbd> + <kbd>w</kbd> | Hide window, not quite |
|
|
111
|
+
| <kbd>⌘</kbd> + <kbd>-</kbd> | <kbd>Ctrl</kbd> + <kbd>-</kbd> | Zoom out the page |
|
|
112
|
+
| <kbd>⌘</kbd> + <kbd>+</kbd> | <kbd>Ctrl</kbd> + <kbd>+</kbd> | Zoom in the page |
|
|
113
|
+
| <kbd>⌘</kbd> + <kbd>=</kbd> | <kbd>Ctrl</kbd> + <kbd>=</kbd> | Zoom in the Page |
|
|
114
|
+
| <kbd>⌘</kbd> + <kbd>0</kbd> | <kbd>Ctrl</kbd> + <kbd>0</kbd> | Reset the page zoom |
|
|
115
|
+
|
|
116
|
+
In addition, double-click the title bar to switch to full-screen mode. For Mac users, you can also use the gesture to go to the previous or next page and drag the title bar to move the window.
|
|
116
117
|
|
|
117
118
|
</details>
|
|
118
119
|
|
|
119
|
-
##
|
|
120
|
+
## Before starting
|
|
120
121
|
|
|
121
|
-
1.
|
|
122
|
-
2.
|
|
123
|
-
3.
|
|
122
|
+
1. **For beginners**: Play with Popular Packages to find out Pake's capabilities, or try to pack your application with [GitHub Actions](https://github.com/tw93/Pake/wiki/GitHub-Actions-Online-Compilation-Multi-system-Version). Don't hesitate to reach for assistance at [Discussion](https://github.com/tw93/Pake/discussions)!
|
|
123
|
+
2. **For developers**: “Command-Line Packaging” supports macOS fully. For Windows/Linux users, it requires some tinkering. [Configure your environment](https://tauri.app/v1/guides/getting-started/prerequisites) before getting started.
|
|
124
|
+
3. **For hackers**: For people who are good at both front-end development and Rust, how about customizing your apps' function more with the following [Customized Development](#development)?
|
|
124
125
|
|
|
125
|
-
##
|
|
126
|
+
## Command-Line Packaging
|
|
126
127
|
|
|
127
|
-
|
|
128
|
-
<img src="https://gw.alipayobjects.com/zos/k/zd/pake.gif" width="100%">
|
|
129
|
-
</kbd>
|
|
130
|
-
<br/><br/>
|
|
128
|
+

|
|
131
129
|
|
|
132
|
-
**Pake
|
|
130
|
+
**Pake provides a command line tool, making the flow of package customization quicker and easier. See [documentation](./bin/README_EN.md) for more information.**
|
|
133
131
|
|
|
134
132
|
```bash
|
|
135
|
-
|
|
133
|
+
# Install with npm
|
|
136
134
|
npm install -g pake-cli
|
|
137
135
|
|
|
138
|
-
|
|
139
|
-
pake url [
|
|
136
|
+
# Command usage
|
|
137
|
+
pake url [OPTIONS]...
|
|
140
138
|
|
|
141
|
-
|
|
139
|
+
# Feel free to play with Pake! It might take a while to prepare the environment the first time you launch Pake.
|
|
142
140
|
pake https://weekly.tw93.fun --name Weekly --transparent
|
|
143
141
|
```
|
|
144
142
|
|
|
145
|
-
|
|
143
|
+
If you are new to the command line, you can compile packages online with _GitHub Actions_. See the [Tutorial](https://github.com/tw93/Pake/wiki/GitHub-Actions-Online-Compilation-Multi-system-Version) for more information.
|
|
146
144
|
|
|
147
|
-
##
|
|
145
|
+
## Development
|
|
148
146
|
|
|
149
|
-
|
|
147
|
+
Prepare your environment before starting. Make sure you have Rust `>=1.63` and Node `>=16` (e.g., `16.18.1`) installed on your computer. For installation guidance, see [Tauri documentation](https://tauri.app/v1/guides/getting-started/prerequisites).
|
|
148
|
+
|
|
149
|
+
If you are unfamiliar with these, it is better to try out the above tool to pack with one click.
|
|
150
150
|
|
|
151
151
|
```sh
|
|
152
|
-
|
|
152
|
+
# Install Dependencies
|
|
153
153
|
npm i
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
# Local development
|
|
156
156
|
npm run dev
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
# Local debug
|
|
159
159
|
npm run dev:debug
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
# Pack application
|
|
162
162
|
npm run build
|
|
163
|
-
|
|
164
163
|
```
|
|
165
164
|
|
|
166
|
-
##
|
|
165
|
+
## Advanced Usage
|
|
167
166
|
|
|
168
|
-
1.
|
|
169
|
-
2.
|
|
170
|
-
3.
|
|
171
|
-
4.
|
|
167
|
+
1. You can refer to the [codebase structure](https://github.com/tw93/Pake/wiki/Description-of-Pake's-code-structure) before working on Pake, which will help you much in development.
|
|
168
|
+
2. Add four fields (`url`, `productName`, `icon`, and `identifier`) to the `tauri.conf.json` and `tauri.xxx.conf.json` in the `src-tauri` directory. You can select a `icon` from the `icons` directory or download one from [macOSicons](https://macosicons.com/#/) to match your product needs.
|
|
169
|
+
3. For configurations on window properties, you can modify the `tauri.conf.json` file to change the value of `width`, `height`, `fullscreen` (or not), `resizable` (or not) of the `windows` property. To adapt to the immersive header on Mac, change `transparent` to `true`, look for the `Header` element, and add the `padding-top` property.
|
|
170
|
+
4. For advanced usages such as style rewriting, advertisement removal, JS injection, container message communication, and user-defined shortcut keys, see [Advanced Usage of Make](https://github.com/tw93/Pake/wiki/Advanced-Usage-of-Make).
|
|
172
171
|
|
|
173
|
-
##
|
|
172
|
+
## Developer
|
|
174
173
|
|
|
175
|
-
Pake
|
|
174
|
+
Pake's development can not be without these Hackers. They contributed a lot of capabilities for Pake. Also, welcome to follow them! ❤️
|
|
176
175
|
|
|
177
176
|
<!-- readme: contributors -start -->
|
|
178
177
|
<table>
|
|
@@ -301,9 +300,9 @@ Pake 的发展离不开这些 Hacker 们,一起贡献了大量能力,也欢
|
|
|
301
300
|
</table>
|
|
302
301
|
<!-- readme: contributors -end -->
|
|
303
302
|
|
|
304
|
-
##
|
|
303
|
+
## Support
|
|
305
304
|
|
|
306
|
-
1.
|
|
307
|
-
2.
|
|
308
|
-
3.
|
|
309
|
-
4.
|
|
305
|
+
1. I have two cats, TangYuan and Coke. If you think Pake delights your life, you can feed them <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">some canned food 🥩</a>.
|
|
306
|
+
2. If you like Pake, you can star it on GitHub. Also, welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=%23Pake%20-%20A%20simple%20Rust%20packaged%20web%20pages%20to%20generate%20Mac%20App%20tool,%20compared%20to%20traditional%20Electron%20package,%20the%20size%20of%20nearly%2040%20times%20smaller,%20generally%20about%202M,%20the%20underlying%20use%20of%20Tauri,%20performance%20experience%20than%20the%20JS%20framework%20is%20much%20lighter~) to your friends.
|
|
307
|
+
3. You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake or join our [Telegram](https://t.me/miaoyan) chat group.
|
|
308
|
+
4. I hope that you enjoy playing with it. Let us know if you find a website that would be great for a Mac App!
|
package/dist/cli.js
CHANGED
|
@@ -48,6 +48,7 @@ const DEFAULT_PAKE_OPTIONS = {
|
|
|
48
48
|
resizable: true,
|
|
49
49
|
transparent: false,
|
|
50
50
|
debug: false,
|
|
51
|
+
multiArch: false,
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
const tlds = [
|
|
@@ -1795,7 +1796,7 @@ function handleOptions(options, url) {
|
|
|
1795
1796
|
|
|
1796
1797
|
function shellExec(command) {
|
|
1797
1798
|
return new Promise((resolve, reject) => {
|
|
1798
|
-
shelljs.exec(command, { async: true, silent: false }, (code) => {
|
|
1799
|
+
shelljs.exec(command, { async: true, silent: false, cwd: npmDirectory }, (code) => {
|
|
1799
1800
|
if (code === 0) {
|
|
1800
1801
|
resolve(0);
|
|
1801
1802
|
}
|
|
@@ -2016,10 +2017,23 @@ class MacBuilder {
|
|
|
2016
2017
|
log.debug('PakeAppOptions', options);
|
|
2017
2018
|
const { name } = options;
|
|
2018
2019
|
yield mergeTauriConfig(url, options, tauriConf);
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2020
|
+
let dmgName;
|
|
2021
|
+
if (options.multiArch) {
|
|
2022
|
+
yield shellExec(`cd ${npmDirectory} && npm install && npm run build:mac`);
|
|
2023
|
+
dmgName = `${name}_${tauriConf.package.version}_universal.dmg`;
|
|
2024
|
+
}
|
|
2025
|
+
else {
|
|
2026
|
+
yield shellExec(`cd ${npmDirectory} && npm install && npm run build`);
|
|
2027
|
+
let arch = "x64";
|
|
2028
|
+
if (process.arch === "arm64") {
|
|
2029
|
+
arch = "aarch64";
|
|
2030
|
+
}
|
|
2031
|
+
else {
|
|
2032
|
+
arch = process.arch;
|
|
2033
|
+
}
|
|
2034
|
+
dmgName = `${name}_${tauriConf.package.version}_${arch}.dmg`;
|
|
2035
|
+
}
|
|
2036
|
+
const appPath = this.getBuildAppPath(npmDirectory, dmgName, options.multiArch);
|
|
2023
2037
|
const distPath = path.resolve(`${name}.dmg`);
|
|
2024
2038
|
yield fs.copyFile(appPath, distPath);
|
|
2025
2039
|
yield fs.unlink(appPath);
|
|
@@ -2027,8 +2041,15 @@ class MacBuilder {
|
|
|
2027
2041
|
logger.success('You can find the app installer in', distPath);
|
|
2028
2042
|
});
|
|
2029
2043
|
}
|
|
2030
|
-
getBuildAppPath(npmDirectory, dmgName) {
|
|
2031
|
-
|
|
2044
|
+
getBuildAppPath(npmDirectory, dmgName, multiArch) {
|
|
2045
|
+
let dmgPath;
|
|
2046
|
+
if (multiArch) {
|
|
2047
|
+
dmgPath = 'src-tauri/target/universal-apple-darwin/release/bundle/dmg';
|
|
2048
|
+
}
|
|
2049
|
+
else {
|
|
2050
|
+
dmgPath = 'src-tauri/target/release/bundle/dmg';
|
|
2051
|
+
}
|
|
2052
|
+
return path.join(npmDirectory, dmgPath, dmgName);
|
|
2032
2053
|
}
|
|
2033
2054
|
}
|
|
2034
2055
|
|
|
@@ -2149,8 +2170,8 @@ class BuilderFactory {
|
|
|
2149
2170
|
}
|
|
2150
2171
|
|
|
2151
2172
|
var name = "pake-cli";
|
|
2152
|
-
var version = "1.2.
|
|
2153
|
-
var description = "🤱🏻
|
|
2173
|
+
var version = "1.2.4";
|
|
2174
|
+
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
|
|
2154
2175
|
var engines = {
|
|
2155
2176
|
node: ">=16.0.0"
|
|
2156
2177
|
};
|
|
@@ -2252,18 +2273,19 @@ function checkUpdateTips() {
|
|
|
2252
2273
|
});
|
|
2253
2274
|
}
|
|
2254
2275
|
|
|
2255
|
-
program.version(packageJson.version).description('A cli application can
|
|
2276
|
+
program.version(packageJson.version).description('A cli application can turn any webpage into a desktop app with Rust.');
|
|
2256
2277
|
program
|
|
2257
2278
|
.showHelpAfterError()
|
|
2258
2279
|
.argument('[url]', 'the web url you want to package', validateUrlInput)
|
|
2259
|
-
.option('--name <string>', 'application name')
|
|
2260
|
-
.option('--icon <string>', 'application icon', DEFAULT_PAKE_OPTIONS.icon)
|
|
2261
|
-
.option('--
|
|
2262
|
-
.option('--
|
|
2263
|
-
.option('--
|
|
2264
|
-
.option('--
|
|
2265
|
-
.option('--
|
|
2266
|
-
.option('--debug', 'debug', DEFAULT_PAKE_OPTIONS.
|
|
2280
|
+
.option('-n, --name <string>', 'application name')
|
|
2281
|
+
.option('-i, --icon <string>', 'application icon', DEFAULT_PAKE_OPTIONS.icon)
|
|
2282
|
+
.option('-w, --width <number>', 'window width', validateNumberInput, DEFAULT_PAKE_OPTIONS.width)
|
|
2283
|
+
.option('-h, --height <number>', 'window height', validateNumberInput, DEFAULT_PAKE_OPTIONS.height)
|
|
2284
|
+
.option('-f, --fullscreen', 'makes the packaged app start in full screen', DEFAULT_PAKE_OPTIONS.fullscreen)
|
|
2285
|
+
.option('-t, --transparent', 'transparent title bar', DEFAULT_PAKE_OPTIONS.transparent)
|
|
2286
|
+
.option('-r, --no-resizable', 'whether the window can be resizable', DEFAULT_PAKE_OPTIONS.resizable)
|
|
2287
|
+
.option('-d, --debug', 'debug', DEFAULT_PAKE_OPTIONS.debug)
|
|
2288
|
+
.option('-m, --multi-arch', "Supports both Intel and m1 chips, only for Mac.", DEFAULT_PAKE_OPTIONS.multiArch)
|
|
2267
2289
|
.action((url, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2268
2290
|
yield checkUpdateTips();
|
|
2269
2291
|
if (!url) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pake-cli",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "🤱🏻
|
|
3
|
+
"version": "1.2.4",
|
|
4
|
+
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.0.0"
|
|
7
7
|
},
|
package/src-tauri/src/pake.js
CHANGED
|
@@ -60,7 +60,8 @@ window.addEventListener("DOMContentLoaded", (_event) => {
|
|
|
60
60
|
.chakra-ui-dark #app .chakra-heading,
|
|
61
61
|
.chakra-ui-light #app .chakra-stack,
|
|
62
62
|
.chakra-ui-dark #app .chakra-stack,
|
|
63
|
-
.app-main .sidebar-mouse-in-out
|
|
63
|
+
.app-main .sidebar-mouse-in-out,
|
|
64
|
+
.chakra-modal__content-container .chakra-modal__header > div > div {
|
|
64
65
|
padding-top: 10px;
|
|
65
66
|
}
|
|
66
67
|
|