pake-cli 0.0.5 → 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 +89 -57
- 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/.DS_Store +0 -0
- package/src-tauri/.gitignore +0 -3
- package/src-tauri/icons/.DS_Store +0 -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"
|
|
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,7 +93,29 @@
|
|
|
61
93
|
</tr>
|
|
62
94
|
</table>
|
|
63
95
|
|
|
64
|
-
|
|
96
|
+
注意:Windows 下不能安装到 `C:\Program File`,会直接闪退,建议安装到其他非管理员权限目录,比如 `D:\Program Files (x86)` 。
|
|
97
|
+
|
|
98
|
+
对于轻度使用用户,使用 **GitHub Actions 在线编译多系统版本** 也是一个不错的选择,可查看[文档](/docs/README.md)。
|
|
99
|
+
|
|
100
|
+
## 命令行打包
|
|
101
|
+
|
|
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)。**
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
// 使用 npm 进行安装
|
|
111
|
+
npm install -g pake-cli
|
|
112
|
+
|
|
113
|
+
// 命令使用
|
|
114
|
+
pake url [options]
|
|
115
|
+
|
|
116
|
+
// 随便玩玩,首次由于安装环境会有些慢,后面就快了
|
|
117
|
+
pake https://weekly.tw93.fun --name Weekly --transparent
|
|
118
|
+
```
|
|
65
119
|
|
|
66
120
|
## 快捷键
|
|
67
121
|
|
|
@@ -80,29 +134,9 @@
|
|
|
80
134
|
|
|
81
135
|
此外还支持双击头部进行全屏切换,拖拽头部进行移动窗口,还有其他需求,欢迎提过来。
|
|
82
136
|
|
|
83
|
-
## 使用命令行打包
|
|
84
|
-
|
|
85
|
-
Pake 提供了命令行工具,可以更快捷方便地打包。(目前仅支持 MacOS)
|
|
86
|
-
|
|
87
|
-
### 安装
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
npm install -g pake-cli
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
如果安装失败提示没有权限,请使用 `sudo` 运行。
|
|
94
|
-
|
|
95
|
-
### 用法
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
pake [options] url
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
更多用法可查看[文档](./bin//README.md)。
|
|
102
|
-
|
|
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
|
|
148
|
+
// 打包应用
|
|
149
|
+
npm run build:release
|
|
119
150
|
|
|
120
|
-
// 打包 Linux 应用
|
|
121
|
-
npm run build:linux
|
|
122
|
-
|
|
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,7 +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
|
+
## 开发者
|
|
175
|
+
|
|
176
|
+
Pake 的发展离不开这些 Hacker 们,一起贡献了大量能力,也欢迎关注他们 ❤️
|
|
152
177
|
|
|
153
178
|
<!-- readme: contributors -start -->
|
|
154
179
|
<table>
|
|
@@ -175,17 +200,24 @@ chmod +x ./script/build.sh && ./script/build.sh
|
|
|
175
200
|
</a>
|
|
176
201
|
</td>
|
|
177
202
|
<td align="center">
|
|
178
|
-
<a href="https://github.com/
|
|
179
|
-
<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"/>
|
|
180
205
|
<br />
|
|
181
|
-
<sub><b>
|
|
206
|
+
<sub><b>Volare</b></sub>
|
|
182
207
|
</a>
|
|
183
208
|
</td>
|
|
184
209
|
<td align="center">
|
|
185
|
-
<a href="https://github.com/
|
|
186
|
-
<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"/>
|
|
187
212
|
<br />
|
|
188
|
-
<sub><b>
|
|
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"/>
|
|
219
|
+
<br />
|
|
220
|
+
<sub><b>Bryan Lee</b></sub>
|
|
189
221
|
</a>
|
|
190
222
|
</td>
|
|
191
223
|
<td align="center">
|
|
@@ -194,15 +226,15 @@ chmod +x ./script/build.sh && ./script/build.sh
|
|
|
194
226
|
<br />
|
|
195
227
|
<sub><b>Horus</b></sub>
|
|
196
228
|
</a>
|
|
197
|
-
</td>
|
|
229
|
+
</td></tr>
|
|
230
|
+
<tr>
|
|
198
231
|
<td align="center">
|
|
199
232
|
<a href="https://github.com/QingZ11">
|
|
200
233
|
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="QingZ11"/>
|
|
201
234
|
<br />
|
|
202
235
|
<sub><b>Steam</b></sub>
|
|
203
236
|
</a>
|
|
204
|
-
</td
|
|
205
|
-
<tr>
|
|
237
|
+
</td>
|
|
206
238
|
<td align="center">
|
|
207
239
|
<a href="https://github.com/2nthony">
|
|
208
240
|
<img src="https://avatars.githubusercontent.com/u/19513289?v=4" width="90;" alt="2nthony"/>
|
|
@@ -228,7 +260,7 @@ chmod +x ./script/build.sh && ./script/build.sh
|
|
|
228
260
|
<a href="https://github.com/liusishan">
|
|
229
261
|
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
|
|
230
262
|
<br />
|
|
231
|
-
<sub><b>
|
|
263
|
+
<sub><b>Liusishan</b></sub>
|
|
232
264
|
</a>
|
|
233
265
|
</td>
|
|
234
266
|
<td align="center">
|