pake-cli 0.0.6 → 0.1.0
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 +79 -49
- package/dist/cli.js +2264 -1
- package/package.json +10 -7
- package/src-tauri/Cargo.lock +111 -419
- package/src-tauri/Cargo.toml +2 -2
- package/src-tauri/icons/qwerty.icns +0 -0
- package/src-tauri/png/icon_256.ico +0 -0
- package/src-tauri/png/icon_32.ico +0 -0
- package/src-tauri/png/icon_512.png +0 -0
- package/src-tauri/png/qwerty_256.ico +0 -0
- package/src-tauri/png/qwerty_32.ico +0 -0
- package/src-tauri/png/qwerty_512.png +0 -0
- package/src-tauri/src/main.rs +12 -10
- package/src-tauri/src/pake.js +44 -41
- package/src-tauri/tauri.conf.json +0 -50
- package/src-tauri/tauri.conf.json.bak +30 -0
- package/src-tauri/tauri.linux.conf.json +34 -0
- package/src-tauri/tauri.macos.conf.json +25 -0
- package/src-tauri/tauri.windows.conf.json +27 -0
- package/src-tauri/icons/translate.icns +0 -0
- package/src-tauri/png/translate_256.ico +0 -0
- package/src-tauri/png/translate_32.ico +0 -0
- package/src-tauri/png/translate_512.png +0 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<a href="https://github.com/tw93/Pake/issues?q=is%3Aissue+is%3Aclosed" target="_blank">
|
|
15
15
|
<img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed/tw93/Pake.svg?style=flat-square"></a>
|
|
16
16
|
</div>
|
|
17
|
-
<div align="left">很简单的用 Rust 打包网页生成很小的桌面 App,支持 Mac / Windows / Linux
|
|
17
|
+
<div align="left">很简单的用 Rust 打包网页生成很小的桌面 App,支持 Mac / Windows / Linux 系统,常用包下载、<a href="#命令行打包">命令行一键打包</a>、<a href="#开发">定制开发</a> 可见下面文档,也欢迎去 <a href=https://github.com/tw93/Pake/discussions>讨论区</a> 交流。</div>
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
## 特征
|
|
@@ -28,32 +28,64 @@
|
|
|
28
28
|
|
|
29
29
|
<table>
|
|
30
30
|
<tr>
|
|
31
|
-
<td>WeRead
|
|
32
|
-
|
|
31
|
+
<td>WeRead
|
|
32
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead.dmg">Mac</a>
|
|
33
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead_amd64.deb">Linux</a>
|
|
34
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead_x64.msi">Windows</a>
|
|
35
|
+
</td>
|
|
36
|
+
<td>Twitter
|
|
37
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter.dmg">Mac</a>
|
|
38
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter_amd64.deb">Linux</a>
|
|
39
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter_x64.msi">Windows</a>
|
|
40
|
+
</td>
|
|
33
41
|
</tr>
|
|
34
42
|
<tr>
|
|
35
43
|
<td><img src=https://cdn.fliggy.com/upic/17dC9I.jpg width=600/></td>
|
|
36
44
|
<td><img src=https://cdn.fliggy.com/upic/mc41xq.jpg width=600/></td>
|
|
37
45
|
</tr>
|
|
38
46
|
<tr>
|
|
39
|
-
<td>YouTube
|
|
40
|
-
|
|
47
|
+
<td>YouTube
|
|
48
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube.dmg">Mac</a>
|
|
49
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube_amd64.deb">Linux</a>
|
|
50
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube_x64.msi">Windows</a>
|
|
51
|
+
</td>
|
|
52
|
+
<td>Reference
|
|
53
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference.dmg">Mac</a>
|
|
54
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference_amd64.deb">Linux</a>
|
|
55
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference_x64.msi">Windows</a>
|
|
56
|
+
</td>
|
|
41
57
|
</tr>
|
|
42
58
|
<tr>
|
|
43
59
|
<td><img src=https://cdn.fliggy.com/upic/Ea5ZRw.png width=600/></td>
|
|
44
60
|
<td><img src=https://cdn.fliggy.com/upic/KFsZIY.png width=600/></td>
|
|
45
61
|
</tr>
|
|
46
62
|
<tr>
|
|
47
|
-
<td>
|
|
48
|
-
|
|
63
|
+
<td>Code
|
|
64
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Code.dmg">Mac</a>
|
|
65
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Code_amd64.deb">Linux</a>
|
|
66
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Code_x64.msi">Windows</a>
|
|
67
|
+
</td>
|
|
68
|
+
<td>Qwerty
|
|
69
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty.dmg">Mac</a>
|
|
70
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_amd64.deb">Linux</a>
|
|
71
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_x64.msi">Windows</a>
|
|
72
|
+
</td>
|
|
49
73
|
</tr>
|
|
50
74
|
<tr>
|
|
51
75
|
<td><img src=https://cdn.fliggy.com/upic/EB1OYP.jpg width=600/></td>
|
|
52
|
-
<td><img src=https://cdn.fliggy.com/upic/
|
|
76
|
+
<td><img src=https://cdn.fliggy.com/upic/FGdQec.png width=600/></td>
|
|
53
77
|
</tr>
|
|
54
78
|
<tr>
|
|
55
|
-
<td>Flomo
|
|
56
|
-
|
|
79
|
+
<td>Flomo
|
|
80
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Flomo.dmg">Mac</a>
|
|
81
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Flomo_amd64.deb">Linux</a>
|
|
82
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/Flomo_x64.msi">Windows</a>
|
|
83
|
+
</td>
|
|
84
|
+
<td>YuQue
|
|
85
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/YuQue.dmg">Mac</a>
|
|
86
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/YuQue_amd64.deb">Linux</a>
|
|
87
|
+
<a href="https://github.com/tw93/Pake/releases/latest/download/YuQue_x64.msi">Windows</a>
|
|
88
|
+
</td>
|
|
57
89
|
</tr>
|
|
58
90
|
<tr>
|
|
59
91
|
<td><img src=https://cdn.fliggy.com/upic/jg9Eeu.jpg width=600/></td>
|
|
@@ -61,28 +93,30 @@
|
|
|
61
93
|
</tr>
|
|
62
94
|
</table>
|
|
63
95
|
|
|
64
|
-
|
|
96
|
+
注意:Windows 下不能安装到 `C:\Program File`,会直接闪退,建议安装到其他非管理员权限目录,比如 `D:\Program Files (x86)` 。
|
|
65
97
|
|
|
66
|
-
|
|
98
|
+
对于轻度使用用户,使用 **GitHub Actions 在线编译多系统版本** 也是一个不错的选择,可查看[文档](/docs/README.md)。
|
|
67
99
|
|
|
68
|
-
|
|
100
|
+
## 命令行打包
|
|
69
101
|
|
|
70
|
-
|
|
102
|
+
<kbd>
|
|
103
|
+
<img src="https://cdn.fliggy.com/upic/cOC1lF.gif" width="100%">
|
|
104
|
+
</kbd>
|
|
105
|
+
<br/><br/>
|
|
106
|
+
|
|
107
|
+
**Pake 提供了命令行工具,可以更快捷方便地一键自定义打你需要的包,详细可见 [文档](./bin/README.md)。**
|
|
71
108
|
|
|
72
109
|
```bash
|
|
110
|
+
// 使用 npm 进行安装
|
|
73
111
|
npm install -g pake-cli
|
|
74
|
-
```
|
|
75
112
|
|
|
76
|
-
|
|
113
|
+
// 命令使用
|
|
114
|
+
pake url [options]
|
|
77
115
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
pake [options] url
|
|
116
|
+
// 随便玩玩,首次由于安装环境会有些慢,后面就快了
|
|
117
|
+
pake https://weekly.tw93.fun --name Weekly --transparent
|
|
82
118
|
```
|
|
83
119
|
|
|
84
|
-
更多用法可查看[文档](./bin//README.md)。
|
|
85
|
-
|
|
86
120
|
## 快捷键
|
|
87
121
|
|
|
88
122
|
| Mac | Windows/Linux | 功能 |
|
|
@@ -102,7 +136,7 @@ pake [options] url
|
|
|
102
136
|
|
|
103
137
|
## 开发
|
|
104
138
|
|
|
105
|
-
开始前参考 [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites
|
|
139
|
+
开始前参考 [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites) 快速配置好环境。
|
|
106
140
|
|
|
107
141
|
```sh
|
|
108
142
|
// 安装依赖
|
|
@@ -111,20 +145,9 @@ npm i
|
|
|
111
145
|
// 调试
|
|
112
146
|
npm run dev
|
|
113
147
|
|
|
114
|
-
//
|
|
115
|
-
npm run build
|
|
116
|
-
|
|
117
|
-
// 打包 Windows 应用
|
|
118
|
-
npm run build:windows
|
|
119
|
-
|
|
120
|
-
// 打包 Linux 应用
|
|
121
|
-
npm run build:linux
|
|
148
|
+
// 打包应用
|
|
149
|
+
npm run build:release
|
|
122
150
|
|
|
123
|
-
// 一键打包所有 Mac/Linux 应用
|
|
124
|
-
chmod +x ./script/build.sh && ./script/build.sh
|
|
125
|
-
|
|
126
|
-
// 一键打包所有 Windows 项目
|
|
127
|
-
.\script\build.bat
|
|
128
151
|
```
|
|
129
152
|
|
|
130
153
|
## 打新包
|
|
@@ -134,7 +157,7 @@ chmod +x ./script/build.sh && ./script/build.sh
|
|
|
134
157
|
3. `npm run dev` 本地调试看看效果,此外可以使用 `npm run dev:debug` 进行容器调试
|
|
135
158
|
4. `npm run build` 运行即可打生产包
|
|
136
159
|
|
|
137
|
-
##
|
|
160
|
+
## 高级用法
|
|
138
161
|
|
|
139
162
|
#### 1. 如何改写样式,如去掉原站广告、不想要的模块、甚至重新设计?
|
|
140
163
|
|
|
@@ -148,9 +171,9 @@ chmod +x ./script/build.sh && ./script/build.sh
|
|
|
148
171
|
|
|
149
172
|
参考 `pake.js` 中通信代码 `postMessage`,写好事件监听,然后用 `window.ipc.postMessage` 将事件以及参数传递出来,然后参考容器接收事件 `window.drag_window`,自己处理即可,更多可以参考 tauri 以及 wry 的官方文档。
|
|
150
173
|
|
|
151
|
-
##
|
|
174
|
+
## 开发者
|
|
152
175
|
|
|
153
|
-
Pake 的发展离不开这些 Hacker
|
|
176
|
+
Pake 的发展离不开这些 Hacker 们,一起贡献了大量能力,也欢迎关注他们 ❤️
|
|
154
177
|
|
|
155
178
|
<!-- readme: contributors -start -->
|
|
156
179
|
<table>
|
|
@@ -177,17 +200,24 @@ Pake 的发展离不开这些 Hacker 们,给贡献了大量的能力,也欢
|
|
|
177
200
|
</a>
|
|
178
201
|
</td>
|
|
179
202
|
<td align="center">
|
|
180
|
-
<a href="https://github.com/
|
|
181
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
203
|
+
<a href="https://github.com/wanghanzhen">
|
|
204
|
+
<img src="https://avatars.githubusercontent.com/u/25301012?v=4" width="90;" alt="wanghanzhen"/>
|
|
182
205
|
<br />
|
|
183
|
-
<sub><b>
|
|
206
|
+
<sub><b>Volare</b></sub>
|
|
184
207
|
</a>
|
|
185
208
|
</td>
|
|
186
209
|
<td align="center">
|
|
187
|
-
<a href="https://github.com/
|
|
188
|
-
<img src="https://avatars.githubusercontent.com/u/
|
|
210
|
+
<a href="https://github.com/essesoul">
|
|
211
|
+
<img src="https://avatars.githubusercontent.com/u/58624474?v=4" width="90;" alt="essesoul"/>
|
|
212
|
+
<br />
|
|
213
|
+
<sub><b>Essesoul</b></sub>
|
|
214
|
+
</a>
|
|
215
|
+
</td>
|
|
216
|
+
<td align="center">
|
|
217
|
+
<a href="https://github.com/liby">
|
|
218
|
+
<img src="https://avatars.githubusercontent.com/u/38807139?v=4" width="90;" alt="liby"/>
|
|
189
219
|
<br />
|
|
190
|
-
<sub><b>
|
|
220
|
+
<sub><b>Bryan Lee</b></sub>
|
|
191
221
|
</a>
|
|
192
222
|
</td>
|
|
193
223
|
<td align="center">
|
|
@@ -196,15 +226,15 @@ Pake 的发展离不开这些 Hacker 们,给贡献了大量的能力,也欢
|
|
|
196
226
|
<br />
|
|
197
227
|
<sub><b>Horus</b></sub>
|
|
198
228
|
</a>
|
|
199
|
-
</td>
|
|
229
|
+
</td></tr>
|
|
230
|
+
<tr>
|
|
200
231
|
<td align="center">
|
|
201
232
|
<a href="https://github.com/QingZ11">
|
|
202
233
|
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="QingZ11"/>
|
|
203
234
|
<br />
|
|
204
235
|
<sub><b>Steam</b></sub>
|
|
205
236
|
</a>
|
|
206
|
-
</td
|
|
207
|
-
<tr>
|
|
237
|
+
</td>
|
|
208
238
|
<td align="center">
|
|
209
239
|
<a href="https://github.com/2nthony">
|
|
210
240
|
<img src="https://avatars.githubusercontent.com/u/19513289?v=4" width="90;" alt="2nthony"/>
|
|
@@ -230,7 +260,7 @@ Pake 的发展离不开这些 Hacker 们,给贡献了大量的能力,也欢
|
|
|
230
260
|
<a href="https://github.com/liusishan">
|
|
231
261
|
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
|
|
232
262
|
<br />
|
|
233
|
-
<sub><b>
|
|
263
|
+
<sub><b>Liusishan</b></sub>
|
|
234
264
|
</a>
|
|
235
265
|
</td>
|
|
236
266
|
<td align="center">
|