Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Apr 28, 2024
2 parents fdf7f0c + ae3a8ce commit ee14658
Show file tree
Hide file tree
Showing 14 changed files with 1,441 additions and 789 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Tw93
Copyright (c) 2024 Tw93

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
120 changes: 71 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/3UREAw.png width=600/></td>
<td><img src=https://raw.githubusercontent.com/tw93/static/master/pic/12.png width=600/></td>
<td><img src=https://gw.alipayobjects.com/zos/k/pn/1.jpg width=600/></td>
</tr>
<tr>
Expand Down Expand Up @@ -196,7 +196,7 @@ npm run build
## Advanced Usage

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.
2. 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 a `icon` from the `icons` directory or download one from [macOSicons](https://macosicons.com/#/) to match your product needs.
2. 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](https://macosicons.com/#/) to match your product needs.
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.
4. For advanced usages such as style rewriting, advertisement removal, JS injection, container message communication, and user-defined shortcut keys, see [Advanced Usage of Pake](https://github.com/tw93/Pake/wiki/Advanced-Usage-of-Pake).

Expand Down Expand Up @@ -279,67 +279,74 @@ Pake's development can not be without these Hackers. They contributed a lot of c
</a>
</td>
<td align="center">
<a href="/QingZ11">
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="QingZ11"/>
<a href="/exposir">
<img src="https://avatars.githubusercontent.com/u/33340988?v=4" width="90;" alt="exposir"/>
<br />
<sub><b>Steam</b></sub>
<sub><b>孟世博</b></sub>
</a>
</td>
<td align="center">
<a href="/exposir">
<img src="https://avatars.githubusercontent.com/u/33340988?v=4" width="90;" alt="exposir"/>
<a href="/QingZ11">
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="QingZ11"/>
<br />
<sub><b>孟世博</b></sub>
<sub><b>Steam</b></sub>
</a>
</td>
<td align="center">
<a href="/2nthony">
<img src="https://avatars.githubusercontent.com/u/19513289?v=4" width="90;" alt="2nthony"/>
<a href="/hetz">
<img src="https://avatars.githubusercontent.com/u/820141?v=4" width="90;" alt="hetz"/>
<br />
<sub><b>2nthony</b></sub>
<sub><b>贺天卓</b></sub>
</a>
</td>
<td align="center">
<a href="/ACGNnsj">
<img src="https://avatars.githubusercontent.com/u/22112141?v=4" width="90;" alt="ACGNnsj"/>
<a href="/piaoyidage">
<img src="https://avatars.githubusercontent.com/u/5135405?v=4" width="90;" alt="piaoyidage"/>
<br />
<sub><b>Null</b></sub>
<sub><b>Ranger</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="/imabutahersiddik">
<img src="https://avatars.githubusercontent.com/u/138387257?v=4" width="90;" alt="imabutahersiddik"/>
<a href="/liusishan">
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
<br />
<sub><b>Abu Taher Siddik</b></sub>
<sub><b>Liusishan</b></sub>
</a>
</td>
<td align="center">
<a href="/kidylee">
<img src="https://avatars.githubusercontent.com/u/841310?v=4" width="90;" alt="kidylee"/>
<a href="/liudonghua123">
<img src="https://avatars.githubusercontent.com/u/2276718?v=4" width="90;" alt="liudonghua123"/>
<br />
<sub><b>An Li</b></sub>
<sub><b>Liudonghua</b></sub>
</a>
</td>
<td align="center">
<a href="/nekomeowww">
<img src="https://avatars.githubusercontent.com/u/11081491?v=4" width="90;" alt="nekomeowww"/>
<a href="/lakca">
<img src="https://avatars.githubusercontent.com/u/16255922?v=4" width="90;" alt="lakca"/>
<br />
<sub><b>Ayaka Neko</b></sub>
<sub><b>Null</b></sub>
</a>
</td>
<td align="center">
<a href="/turkyden">
<img src="https://avatars.githubusercontent.com/u/24560160?v=4" width="90;" alt="turkyden"/>
<a href="/houhoz">
<img src="https://avatars.githubusercontent.com/u/19684376?v=4" width="90;" alt="houhoz"/>
<br />
<sub><b>Dengju Deng</b></sub>
<sub><b>Hyzhao</b></sub>
</a>
</td>
<td align="center">
<a href="/Fechin">
<img src="https://avatars.githubusercontent.com/u/2541482?v=4" width="90;" alt="Fechin"/>
<a href="/geekvest">
<img src="https://avatars.githubusercontent.com/u/126322776?v=4" width="90;" alt="geekvest"/>
<br />
<sub><b>Fechin</b></sub>
<sub><b>Null</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/princemaple">
<img src="https://avatars.githubusercontent.com/u/1329716?v=4" width="90;" alt="princemaple"/>
<br />
<sub><b>Po Chen</b></sub>
</a>
</td>
<td align="center">
Expand All @@ -348,48 +355,63 @@ Pake's development can not be without these Hackers. They contributed a lot of c
<br />
<sub><b>Milo</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/eltociear">
<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="90;" alt="eltociear"/>
<br />
<sub><b>Ikko Eltociear Ashimine</b></sub>
</a>
</td>
<td align="center">
<a href="/princemaple">
<img src="https://avatars.githubusercontent.com/u/1329716?v=4" width="90;" alt="princemaple"/>
<a href="/Fechin">
<img src="https://avatars.githubusercontent.com/u/2541482?v=4" width="90;" alt="Fechin"/>
<br />
<sub><b>Po Chen</b></sub>
<sub><b>Fechin</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="/houhoz">
<img src="https://avatars.githubusercontent.com/u/19684376?v=4" width="90;" alt="houhoz"/>
<a href="/turkyden">
<img src="https://avatars.githubusercontent.com/u/24560160?v=4" width="90;" alt="turkyden"/>
<br />
<sub><b>Hyzhao</b></sub>
<sub><b>Dengju Deng</b></sub>
</a>
</td>
<td align="center">
<a href="/lakca">
<img src="https://avatars.githubusercontent.com/u/16255922?v=4" width="90;" alt="lakca"/>
<a href="/nekomeowww">
<img src="https://avatars.githubusercontent.com/u/11081491?v=4" width="90;" alt="nekomeowww"/>
<br />
<sub><b>Null</b></sub>
<sub><b>Ayaka Neko</b></sub>
</a>
</td>
<td align="center">
<a href="/liusishan">
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
<a href="/kidylee">
<img src="https://avatars.githubusercontent.com/u/841310?v=4" width="90;" alt="kidylee"/>
<br />
<sub><b>Liusishan</b></sub>
<sub><b>An Li</b></sub>
</a>
</td>
<td align="center">
<a href="/piaoyidage">
<img src="https://avatars.githubusercontent.com/u/5135405?v=4" width="90;" alt="piaoyidage"/>
<a href="/imabutahersiddik">
<img src="https://avatars.githubusercontent.com/u/138387257?v=4" width="90;" alt="imabutahersiddik"/>
<br />
<sub><b>Ranger</b></sub>
<sub><b>Abu Taher Siddik</b></sub>
</a>
</td>
<td align="center">
<a href="/hetz">
<img src="https://avatars.githubusercontent.com/u/820141?v=4" width="90;" alt="hetz"/>
<a href="/ACGNnsj">
<img src="https://avatars.githubusercontent.com/u/22112141?v=4" width="90;" alt="ACGNnsj"/>
<br />
<sub><b>贺天卓</b></sub>
<sub><b>Null</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/2nthony">
<img src="https://avatars.githubusercontent.com/u/19513289?v=4" width="90;" alt="2nthony"/>
<br />
<sub><b>2nthony</b></sub>
</a>
</td></tr>
</table>
Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
</td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/3UREAw.png width=600/></td>
<td><img src=https://gw.alipayobjects.com/zos/k/pn/1.jpg width=600/></td>
<td><img src=https://raw.githubusercontent.com/tw93/static/master/pic/12.png width=600 /></td>
<td><img src=https://gw.alipayobjects.com/zos/k/pn/1.jpg width=600 /></td>
</tr>
<tr>
<td>LiZhi
Expand Down
4 changes: 2 additions & 2 deletions bin/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function resolveAppName(name: string, platform: NodeJS.Platform): string {
function isValidName(name: string, platform: NodeJS.Platform): boolean {
const platformRegexMapping: PlatformMap = {
linux: /^[a-z0-9]+(-[a-z0-9]+)*$/,
default: /^[a-zA-Z0-9]+$/,
default: /^[a-zA-Z0-9]+([-a-zA-Z0-9])*$/,
};
const reg = platformRegexMapping[platform] || platformRegexMapping.default;
return !!name && reg.test(name);
Expand All @@ -38,7 +38,7 @@ export default async function handleOptions(

if (!isValidName(name, platform)) {
const LINUX_NAME_ERROR = `✕ name should only include lowercase letters, numbers, and dashes, and must contain at least one lowercase letter. Examples: com-123-xxx, 123pan, pan123, weread, we-read.`;
const DEFAULT_NAME_ERROR = `✕ Name should only include letters and numbers, and must contain at least one letter. Examples: 123pan, 123Pan, Pan123, weread, WeRead, WERead.`;
const DEFAULT_NAME_ERROR = `✕ Name should only include letters and numbers, and dashes (dashes must not at the beginning), and must contain at least one letter. Examples: 123pan, 123Pan, Pan123, weread, WeRead, WERead, we-read.`;
const errorMsg = platform === 'linux' ? LINUX_NAME_ERROR : DEFAULT_NAME_ERROR;
logger.error(errorMsg);
if (isActions) {
Expand Down
6 changes: 3 additions & 3 deletions dist/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import psl from 'psl';
import isUrl from 'is-url';

var name = "pake-cli";
var version = "2.3.5";
var version = "2.3.6";
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";
var engines = {
node: ">=16.0.0"
Expand Down Expand Up @@ -946,7 +946,7 @@ function resolveAppName(name, platform) {
function isValidName(name, platform) {
const platformRegexMapping = {
linux: /^[a-z0-9]+(-[a-z0-9]+)*$/,
default: /^[a-zA-Z0-9]+$/,
default: /^[a-zA-Z0-9]+([-a-zA-Z0-9])*$/,
};
const reg = platformRegexMapping[platform] || platformRegexMapping.default;
return !!name && reg.test(name);
Expand All @@ -964,7 +964,7 @@ async function handleOptions(options, url) {
}
if (!isValidName(name, platform)) {
const LINUX_NAME_ERROR = `✕ name should only include lowercase letters, numbers, and dashes, and must contain at least one lowercase letter. Examples: com-123-xxx, 123pan, pan123, weread, we-read.`;
const DEFAULT_NAME_ERROR = `✕ Name should only include letters and numbers, and must contain at least one letter. Examples: 123pan, 123Pan, Pan123, weread, WeRead, WERead.`;
const DEFAULT_NAME_ERROR = `✕ Name should only include letters and numbers, and dashes (dashes must not at the beginning), and must contain at least one letter. Examples: 123pan, 123Pan, Pan123, weread, WeRead, WERead, we-read.`;
const errorMsg = platform === 'linux' ? LINUX_NAME_ERROR : DEFAULT_NAME_ERROR;
logger.error(errorMsg);
if (isActions) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pake-cli",
"version": "2.3.5",
"version": "2.3.6",
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。",
"engines": {
"node": ">=16.0.0"
Expand Down
Loading

0 comments on commit ee14658

Please sign in to comment.