[新服务] 使用 Pake 将网页打包成桌面应用程序
date
Mar 9, 2024
slug
packaging-webpages-into-desktop-apps-with-pake
status
Published
summary
新服务-
tags
service
type
Post
URL
Summary
Pake 是一个利用 Rust 将任何网页转换为桌面应用的工具。它支持 Mac、Windows 和 Linux 系统,比 Electron 打包小 20 倍,体积仅 5M 左右,比基于 JS 的框架更轻量快速。Pake 提供了 Popular Packages、Command-Line Packaging 和 Customized Development 等功能。开发者可以利用命令行工具进行打包,并根据需求定制应用程序。需要注意的难点是在 Windows/Linux 系统上配置环境可能需要一些技巧。开发者需要具备 Rust 和 Node 的基础知识,才能更好地利用 Pake 进行开发。该工具提供了简单易用的命令行工具和高级定制功能,适用于不同需求的开发者。
步骤 - 或直接下载已打包好的,或者自己打包
#1
# 自己打包
npm install -g pake-cli
# Command usage
pake url [OPTIONS]...
# Feel free to play with Pake! It might take a while to prepare the environment the first time you launch Pake.
pake https://weekly.tw93.fun --name Weekly --hide-title-bar
pake https://www.lpolaris.com --name Weekly --hide-title-bar
#2
验证
Skip to content
Product
Solutions
Open Source
Pricing
Search or jump to...
Sign in
Sign up
tw93
/
Pake
Public
Code
Issues
7
Pull requests
1
Discussions
Actions
Wiki
Security
Insights
tw93/Pake
Go to file
Folders and files
Name
Latest commit
tw93
tw93
docs(contributor): contrib-readme-action has updated readme
379c9e9
·
last week
History
.github
🐛 update build single app
7 months ago
bin
fix some comments
last week
dist
fix some comments
last week
script
🐛 fix build app
7 months ago
src-tauri
🐛 Compatible with the latest gpt
last month
.ecrc.json
🔧 Configuration specification
9 months ago
.editorconfig
🔧 Configuration specification
9 months ago
.gitattributes
style: fmt rust code
8 months ago
.gitignore
update: 完善开发模式
8 months ago
.prettierignore
🎨 Refactoring CLI
9 months ago
.prettierrc.json
🎨 Unified code style
9 months ago
CODE_OF_CONDUCT.md
🔧 Configuration specification
9 months ago
CONTRIBUTING.md
🔧 Configuration specification
9 months ago
LICENSE
🎨 Correct document format
9 months ago
README.md
docs(contributor): contrib-readme-action has updated readme
last week
README_CN.md
🐛 update youtube music pic
3 months ago
apps.conf.json
🎨 Output is more standardized
7 months ago
cli.js
🔧 Configuration specification
9 months ago
icns2png.py
🔧 Configuration specification
9 months ago
package.json
🔖 2.3.6
4 months ago
rollup.config.js
🎨 Fix the bug of download icon
7 months ago
tsconfig.json
🎨 Optimize the use of CLI.
9 months ago
Repository files navigation
README
Code of conduct
MIT license
English | 简体中文
Pake
Turn any webpage into a desktop app with Rust with ease.
twitter telegram GitHub downloads GitHub commit GitHub closed issues Open in Colab
Pake supports Mac, Windows, and Linux. Check out README for Popular Packages, Command-Line Packaging, and Customized Development information. Feel free to share your suggestions in Discussions.
Features
🎐 Nearly 20 times smaller than an Electron package (around 5M!)
🚀 With Rust Tauri, Pake is much more lightweight and faster than JS-based frameworks.
📦 Battery-included package — shortcut pass-through, immersive windows, and minimalist customization.
👻 Pake is just a simple tool — replace the old bundle approach with Tauri (though PWA is good enough).
Popular Packages
WeRead Mac Windows Linux Twitter Mac Windows Linux
ChatGPT Mac Windows Linux Poe Mac Windows Linux
YouTube Music Mac Windows Linux YouTube Mac Windows Linux
LiZhi Mac Windows Linux ProgramMusic Mac Windows Linux
Qwerty Mac Windows Linux CodeRunner Mac Windows Linux
Flomo Mac Windows Linux XiaoHongShu Mac Windows Linux
🏂 You can download more applications from Releases. Click here to expand the shortcuts reference!
Before starting
For beginners: Play with Popular Packages to find out Pake's capabilities, or try to pack your application with GitHub Actions. Don't hesitate to reach for assistance at Discussion!
For developers: “Command-Line Packaging” supports macOS fully. For Windows/Linux users, it requires some tinkering. Configure your environment before getting started.
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?
Command-Line Packaging
Pake
Pake provides a command line tool, making the flow of package customization quicker and easier. See documentation for more information.
# Install with npm
npm install -g pake-cli
# Command usage
pake url [OPTIONS]...
# Feel free to play with Pake! It might take a while to prepare the environment the first time you launch Pake.
pake https://weekly.tw93.fun --name Weekly --transparent
If you are new to the command line, you can compile packages online with GitHub Actions. See the Tutorial for more information.
Development
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.
If you are unfamiliar with these, it is better to try out the above tool to pack with one click.
# Install Dependencies
npm i
# Local development [Right-click to open debug mode.]
npm run dev
# Pack application
npm run build
Advanced Usage
You can refer to the codebase structure before working on Pake, which will help you much in development.
Modify the url and productName fields in the pake.json file under the src-tauri directory, the "domain" field in the tauri.config.json file needs to be modified synchronously, as well as the icon and identifier fields in the tauri.xxx.conf.json file. You can select an icon from the icons directory or download one from macOSicons to match your product needs.
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.
For advanced usages such as style rewriting, advertisement removal, JS injection, container message communication, and user-defined shortcut keys, see Advanced Usage of Pake.
Developers
Pake's development can not be without these Hackers. They contributed a lot of capabilities for Pake. Also, welcome to follow them! ❤️
tw93
Tw93 Tlntin
Tlntin jeasonnow
Santree pan93412
Pan93412 wanghanzhen
Volare liby
Bryan Lee essesoul
Essesoul
AielloChan
Aiello m1911star
Horus Pake-Actions
Pake Actions exposir
孟世博 QingZ11
Steam hetz
贺天卓 piaoyidage
Ranger
liusishan
Liusishan liudonghua123
Liudonghua lakca
Null houhoz
Hyzhao geekvest
Null princemaple
Po Chen Milo123459
Milo
eltociear
Ikko Eltociear Ashimine Fechin
Fechin turkyden
Dengju Deng nekomeowww
Ayaka Neko kidylee
An Li imabutahersiddik
Abu Taher Siddik ACGNnsj
Null
2nthony
2nthony
Support
I have two cats, TangYuan and Coke. If you think Pake delights your life, you can feed them some canned food 🥩.
If you like Pake, you can star it on GitHub. Also, welcome to recommend Pake to your friends.
You can follow my Twitter to get the latest news of Pake or join our Telegram chat group.
I hope that you enjoy playing with it. Let us know if you find a website that would be great for a Mac App!
About
🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用
Topics
music rust productivity mac youtube twitter programming webview open high-performance openai windows-desktop poe linux-desktop tauri mac-desktop gpt-4 no-electron chatgpt
Resources
Readme
License
MIT license
Code of conduct
Code of conduct
Activity
Stars
22.2k stars
Watchers
134 watching
Forks
3.3k forks
Report repository
Releases 26
V2.3.5 More Rigorous
Latest
on Nov 18, 2023
+ 25 releases
Sponsor this project
@tw93
tw93 Tw93
https://miaoyan.app/cats.html?name=Pake
Learn more about GitHub Sponsors
Contributors
29
@tw93
@Tlntin
@jeasonnow
@pan93412
@wanghanzhen
@essesoul
@liby
@AielloChan
@m1911star
@Pake-Actions
@exposir
@princemaple
@Fechin
@nekomeowww
+ 15 contributors
Languages
Rust
100.0%
Footer
© 2024 GitHub, Inc.
Footer navigation
Terms
Privacy
Security
Status
Docs
Contact
Manage cookies
Do not share my personal information
用中文总结,逻辑清晰,简明扼要。但重点难点要特别指出来。
Pake 是一个利用 Rust 将任何网页转换为桌面应用的工具。它支持 Mac、Windows 和 Linux 系统,比 Electron 打包小 20 倍,体积仅 5M 左右,比基于 JS 的框架更轻量快速。Pake 提供了 Popular Packages、Command-Line Packaging 和 Customized Development 等功能。开发者可以利用命令行工具进行打包,并根据需求定制应用程序。需要注意的难点是在 Windows/Linux 系统上配置环境可能需要一些技巧。开发者需要具备 Rust 和 Node 的基础知识,才能更好地利用 Pake 进行开发。该工具提供了简单易用的命令行工具和高级定制功能,适用于不同需求的开发者。