pake-cli 1.3.1 → 2.0.0-alpha7
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 +26 -22
- package/dist/about_pake.html +16 -0
- package/dist/cli.js +389 -86
- package/package.json +3 -2
- package/src-tauri/.cargo/cn_config.bak +14 -0
- package/src-tauri/Cargo.lock +1420 -586
- package/src-tauri/Cargo.toml +16 -14
- package/src-tauri/pake.json +28 -0
- package/src-tauri/src/app/config.rs +63 -0
- package/src-tauri/src/app/invoke.rs +47 -0
- package/src-tauri/src/app/menu.rs +114 -0
- package/src-tauri/src/app/mod.rs +4 -0
- package/src-tauri/src/app/window.rs +49 -0
- package/src-tauri/src/inject/component.js +143 -0
- package/src-tauri/src/inject/event.js +175 -0
- package/src-tauri/src/{pake.js → inject/style.js} +37 -141
- package/src-tauri/src/main.rs +61 -266
- package/src-tauri/src/util.rs +78 -0
- package/src-tauri/tauri.conf.json +26 -29
- package/src-tauri/tauri.linux.conf.json +18 -30
- package/dist/index.html +0 -22
- package/dist/script.js +0 -7
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div align="center">
|
|
8
8
|
<a href="https://twitter.com/HiTw93" target="_blank">
|
|
9
9
|
<img alt="twitter" src="https://img.shields.io/badge/follow-Tw93-red?style=flat-square&logo=Twitter"></a>
|
|
10
|
-
<a href="https://t.me
|
|
10
|
+
<a href="https://t.me/+GclQS9ZnxyI2ODQ1" target="_blank">
|
|
11
11
|
<img alt="telegram" src="https://img.shields.io/badge/chat-telegram-blueviolet?style=flat-square&logo=Telegram"></a>
|
|
12
12
|
<a href="https://github.com/tw93/Pake/releases" target="_blank">
|
|
13
13
|
<img alt="GitHub downloads" src="https://img.shields.io/github/downloads/tw93/Pake/total.svg?style=flat-square"></a>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
24
|
-
- 🎐 Nearly
|
|
24
|
+
- 🎐 Nearly 20 times smaller than an Electron package (around 5M!)
|
|
25
25
|
- 🚀 With Rust Tauri, Pake is much more lightweight and faster than JS-based frameworks.
|
|
26
26
|
- 📦 Battery-included package — shortcut pass-through, immersive windows, and minimalist customization.
|
|
27
27
|
- 👻 Pake is just a simple tool — replace the old bundle approach with Rust (though PWA is good enough).
|
|
@@ -46,20 +46,20 @@
|
|
|
46
46
|
<td><img src=https://cdn.fliggy.com/upic/mc41xq.jpg width=600/></td>
|
|
47
47
|
</tr>
|
|
48
48
|
<tr>
|
|
49
|
-
<td>LiZhi
|
|
50
|
-
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi.dmg">Mac</a>
|
|
51
|
-
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi_x64.msi">Windows</a>
|
|
52
|
-
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi_x86_64.deb">Linux</a>
|
|
53
|
-
</td>
|
|
54
49
|
<td>ChatGPT
|
|
55
50
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT.dmg">Mac</a>
|
|
56
51
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT_x64.msi">Windows</a>
|
|
57
52
|
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT_x86_64.deb">Linux</a>
|
|
58
53
|
</td>
|
|
54
|
+
<td>LiZhi
|
|
55
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi.dmg">Mac</a>
|
|
56
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi_x64.msi">Windows</a>
|
|
57
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi_x86_64.deb">Linux</a>
|
|
58
|
+
</td>
|
|
59
59
|
</tr>
|
|
60
60
|
<tr>
|
|
61
|
+
<td><img src=https://cdn.fliggy.com/upic/0khyI4.png width=600/></td>
|
|
61
62
|
<td><img src=https://cdn.fliggy.com/upic/nYEKqN.jpg width=600/></td>
|
|
62
|
-
<td><img src=https://cdn.fliggy.com/upic/LW9BMz.png width=600/></td>
|
|
63
63
|
</tr>
|
|
64
64
|
<tr>
|
|
65
65
|
<td>YouTube
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
</tr>
|
|
76
76
|
<tr>
|
|
77
77
|
<td><img src=https://cdn.fliggy.com/upic/s4ZLNC.jpg width=600/></td>
|
|
78
|
-
<td><img src=https://cdn.fliggy.com/upic/
|
|
78
|
+
<td><img src=https://cdn.fliggy.com/upic/sKN5Bn.png width=600/></td>
|
|
79
79
|
</tr>
|
|
80
80
|
<tr>
|
|
81
81
|
<td>ProgramMusic
|
|
@@ -135,7 +135,7 @@ In addition, double-click the title bar to switch to full-screen mode. For Mac u
|
|
|
135
135
|
|
|
136
136
|
## Before starting
|
|
137
137
|
|
|
138
|
-
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/
|
|
138
|
+
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/Online-Compilation-(used-by-ordinary-users)). Don't hesitate to reach for assistance at [Discussion](https://github.com/tw93/Pake/discussions)!
|
|
139
139
|
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.
|
|
140
140
|
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)?
|
|
141
141
|
|
|
@@ -156,7 +156,7 @@ pake url [OPTIONS]...
|
|
|
156
156
|
pake https://weekly.tw93.fun --name Weekly --transparent
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
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/
|
|
159
|
+
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/Online-Compilation-(used-by-ordinary-users)) for more information.
|
|
160
160
|
|
|
161
161
|
## Development
|
|
162
162
|
|
|
@@ -168,12 +168,9 @@ If you are unfamiliar with these, it is better to try out the above tool to pack
|
|
|
168
168
|
# Install Dependencies
|
|
169
169
|
npm i
|
|
170
170
|
|
|
171
|
-
# Local development
|
|
171
|
+
# Local development [Right-click to open debug mode.]
|
|
172
172
|
npm run dev
|
|
173
173
|
|
|
174
|
-
# Local debug
|
|
175
|
-
npm run dev:debug
|
|
176
|
-
|
|
177
174
|
# Pack application
|
|
178
175
|
npm run build
|
|
179
176
|
```
|
|
@@ -181,9 +178,9 @@ npm run build
|
|
|
181
178
|
## Advanced Usage
|
|
182
179
|
|
|
183
180
|
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.
|
|
184
|
-
2. Modify the `url` and `productName` fields in the `
|
|
185
|
-
3. For configurations on window properties, you can modify the `
|
|
186
|
-
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-
|
|
181
|
+
2. Modify the `url` and `productName` fields in the `pake.json` file under the src-tauri directory, as well as the `icon` and `identifier` fields in the `tauri.xxx.conf.json` file. You can select a `icon` from the `icons` directory or download one from [macOSicons](https://macosicons.com/#/) to match your product needs.
|
|
182
|
+
3. For configurations on window properties, you can modify the `pake.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.
|
|
183
|
+
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-Pake).
|
|
187
184
|
|
|
188
185
|
## Developer
|
|
189
186
|
|
|
@@ -242,6 +239,13 @@ Pake's development can not be without these Hackers. They contributed a lot of c
|
|
|
242
239
|
</a>
|
|
243
240
|
</td></tr>
|
|
244
241
|
<tr>
|
|
242
|
+
<td align="center">
|
|
243
|
+
<a href="https://github.com/Pake-Actions">
|
|
244
|
+
<img src="https://avatars.githubusercontent.com/u/126550811?v=4" width="90;" alt="Pake-Actions"/>
|
|
245
|
+
<br />
|
|
246
|
+
<sub><b>Pake Actions</b></sub>
|
|
247
|
+
</a>
|
|
248
|
+
</td>
|
|
245
249
|
<td align="center">
|
|
246
250
|
<a href="https://github.com/AielloChan">
|
|
247
251
|
<img src="https://avatars.githubusercontent.com/u/7900765?v=4" width="90;" alt="AielloChan"/>
|
|
@@ -283,15 +287,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
|
|
|
283
287
|
<br />
|
|
284
288
|
<sub><b>Ayaka Neko</b></sub>
|
|
285
289
|
</a>
|
|
286
|
-
</td>
|
|
290
|
+
</td></tr>
|
|
291
|
+
<tr>
|
|
287
292
|
<td align="center">
|
|
288
293
|
<a href="https://github.com/turkyden">
|
|
289
294
|
<img src="https://avatars.githubusercontent.com/u/24560160?v=4" width="90;" alt="turkyden"/>
|
|
290
295
|
<br />
|
|
291
296
|
<sub><b>Dengju Deng</b></sub>
|
|
292
297
|
</a>
|
|
293
|
-
</td
|
|
294
|
-
<tr>
|
|
298
|
+
</td>
|
|
295
299
|
<td align="center">
|
|
296
300
|
<a href="https://github.com/Fechin">
|
|
297
301
|
<img src="https://avatars.githubusercontent.com/u/2541482?v=4" width="90;" alt="Fechin"/>
|
|
@@ -334,5 +338,5 @@ Pake's development can not be without these Hackers. They contributed a lot of c
|
|
|
334
338
|
|
|
335
339
|
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>.
|
|
336
340
|
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.
|
|
337
|
-
3. You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake or join our [Telegram](https://t.me
|
|
341
|
+
3. You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake or join our [Telegram](https://t.me/+GclQS9ZnxyI2ODQ1) chat group.
|
|
338
342
|
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!
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Document</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<h5>Welcome from Pake!</h5>
|
|
10
|
+
<p>version: 1.0.9</p>
|
|
11
|
+
<a href="https://github.com/tw93/Pake">Project link</a><br>
|
|
12
|
+
<a href="https://github.com/tw93/Pake/discussions">Discussions</a><br>
|
|
13
|
+
<a href="https://github.com/tw93/Pake/issues" >Issues</a><br>
|
|
14
|
+
<p>LICENSE: MIT</p>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|